- Timestamp:
- Jul 18, 2009 9:18:26 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsystest/systest.c
r2839 r2840 616 616 unsigned i, samples_per_frame, read, len; 617 617 unsigned start_pos; 618 pj_bool_t first; 618 619 pj_status_t status; 619 620 … … 645 646 } 646 647 648 /* Zero the first 500ms to remove loud click noises 649 * (keypad press, etc.) 650 */ 651 pjmedia_zero_samples(buf, wav->info.clock_rate / 2); 652 647 653 /* Loop to calculate latency */ 648 654 start_pos = 0; 655 first = PJ_TRUE; 649 656 while (start_pos < len/2 - wav->info.clock_rate) { 650 657 int max_signal = 0; … … 692 699 693 700 /* Advance next loop */ 694 if ( start_pos == 0) {701 if (first) { 695 702 start_pos = max_signal_pos + wav->info.clock_rate * 9 / 10; 703 first = PJ_FALSE; 696 704 } else { 697 705 start_pos += wav->info.clock_rate;
Note: See TracChangeset
for help on using the changeset viewer.