Changeset 3115 for pjproject/trunk/pjsip-apps/src/samples/aectest.c
- Timestamp:
- Mar 3, 2010 2:47:35 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/samples/aectest.c
r2394 r3115 56 56 "\n" 57 57 " options:\n" 58 " -d The delay between playback and capture in ms. Default is zero.\n" 58 " -d The delay between playback and capture in ms, at least 25 ms.\n" 59 " Default is 25 ms. See note below. \n" 59 60 " -l Set the echo tail length in ms. Default is 200 ms \n" 60 61 " -r Set repeat count (default=1) \n" 61 62 " -a Algorithm: 0=default, 1=speex, 3=echo suppress \n" 62 " -i Interactive \n"; 63 " -i Interactive \n" 64 "\n" 65 " Note that for the AEC internal buffering mechanism, it is required\n" 66 " that the echoed signal (in REC.WAV) is delayed from the \n" 67 " corresponding reference signal (in PLAY.WAV) at least as much as \n" 68 " frame time + PJMEDIA_WSOLA_DELAY_MSEC. In this application, frame \n" 69 " time is 20 ms and default PJMEDIA_WSOLA_DELAY_MSEC is 5 ms, hence \n" 70 " 25 ms delay is the minimum value. \n"; 63 71 64 72 /* … … 92 100 pjmedia_frame play_frame, rec_frame; 93 101 unsigned opt = 0; 94 unsigned latency_ms = 0;102 unsigned latency_ms = 25; 95 103 unsigned tail_ms = TAIL_LENGTH; 96 104 pj_timestamp t0, t1; … … 102 110 case 'd': 103 111 latency_ms = atoi(pj_optarg); 112 if (latency_ms < 25) { 113 puts("Invalid delay"); 114 puts(desc); 115 } 104 116 break; 105 117 case 'l': … … 128 140 repeat = atoi(pj_optarg); 129 141 if (repeat < 1) { 130 puts("Invalid algorithm");142 puts("Invalid repeat count"); 131 143 puts(desc); 132 144 return 1; … … 252 264 pj_get_timestamp(&t1); 253 265 254 i = pjmedia_wav_writer_port_get_pos(wav_out) * 1000 /266 i = pjmedia_wav_writer_port_get_pos(wav_out) / sizeof(pj_int16_t) * 1000 / 255 267 (wav_out->info.clock_rate * wav_out->info.channel_count); 256 268 PJ_LOG(3,(THIS_FILE, "Processed %3d.%03ds audio",
Note: See TracChangeset
for help on using the changeset viewer.