Changeset 2839 for pjproject/trunk/pjsip-apps/src/pjsystest/systest.c
- Timestamp:
- Jul 17, 2009 11:37:42 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsystest/systest.c
r2836 r2839 378 378 rec_id = PJSUA_INVALID_ID; 379 379 380 status = pjsua_player_create(&filename, 0, &play_id); 381 if (status != PJ_SUCCESS) 382 goto on_return; 383 384 play_slot = pjsua_player_get_conf_port(play_id); 385 386 status = pjsua_conf_connect(play_slot, 0); 387 if (status != PJ_SUCCESS) 388 goto on_return; 389 380 390 key = gui_msgbox(title, 381 "Recording has been stopped. Press OK to playback " 382 "the recorded audio.", 383 WITH_OK); 384 385 status = pjsua_player_create(&filename, 0, &play_id); 386 if (status != PJ_SUCCESS) 387 goto on_return; 388 389 play_slot = pjsua_player_get_conf_port(play_id); 390 391 status = pjsua_conf_connect(play_slot, 0); 392 if (status != PJ_SUCCESS) 393 goto on_return; 394 395 key = gui_msgbox(title, 391 "Recording has been stopped. " 396 392 "The recorded audio is being played now to " 397 393 "the speaker device, in a loop. Listen for " … … 487 483 param.rec_id = systest.rec_id; 488 484 param.play_id = systest.play_id; 489 param.clock_rate = systest.media_cfg. clock_rate;485 param.clock_rate = systest.media_cfg.snd_clock_rate; 490 486 param.channel_count = systest.media_cfg.channel_count; 491 487 param.samples_per_frame = param.clock_rate * param.channel_count * … … 569 565 570 566 pj_ansi_snprintf(drifttext, sizeof(drifttext), 571 "Clock drifts detected. Capture device"572 "is running %d samples per second%s "567 "Clock drifts detected. Capture " 568 "is %d samples/sec %s " 573 569 "than the playback device", 574 570 drift, which); … … 681 677 lat = (max_echo_pos - max_signal_pos) * 1000 / wav->info.clock_rate; 682 678 683 #if 1679 #if 0 684 680 PJ_LOG(4,(THIS_FILE, "Signal at %dms, echo at %d ms, latency %d ms", 685 681 max_signal_pos * 1000 / wav->info.clock_rate, … … 771 767 772 768 /* We're running */ 769 PJ_LOG(3,(THIS_FILE, "Please wait while test is running (~10 sec)")); 773 770 gui_sleep(10); 774 771 … … 947 944 len = strlen(textbuf); 948 945 949 pj_ansi_snprintf(textbuf+len, sizeof(textbuf)-len, " Clock rate: %d\r\n",946 pj_ansi_snprintf(textbuf+len, sizeof(textbuf)-len, "Test clock rate: %d\r\n", 950 947 systest.media_cfg.clock_rate); 948 len = strlen(textbuf); 949 950 pj_ansi_snprintf(textbuf+len, sizeof(textbuf)-len, "Device clock rate: %d\r\n", 951 systest.media_cfg.snd_clock_rate); 951 952 len = strlen(textbuf); 952 953 … … 1032 1033 pjsua_config_default(&systest.ua_cfg); 1033 1034 pjsua_media_config_default(&systest.media_cfg); 1034 systest.media_cfg.clock_rate = CLOCK_RATE; 1035 systest.media_cfg.clock_rate = TEST_CLOCK_RATE; 1036 systest.media_cfg.snd_clock_rate = DEV_CLOCK_RATE; 1035 1037 if (OVERRIDE_AUD_FRAME_PTIME) 1036 1038 systest.media_cfg.audio_frame_ptime = OVERRIDE_AUD_FRAME_PTIME; 1037 1039 systest.media_cfg.channel_count = CHANNEL_COUNT; 1038 systest.rec_id = PJMEDIA_AUD_DEFAULT_CAPTURE_DEV;1039 systest.play_id = P JMEDIA_AUD_DEFAULT_PLAYBACK_DEV;1040 systest.rec_id = REC_DEV_ID; 1041 systest.play_id = PLAY_DEV_ID; 1040 1042 systest.media_cfg.ec_tail_len = 0; 1041 1043
Note: See TracChangeset
for help on using the changeset viewer.