Ignore:
Timestamp:
Mar 27, 2009 3:15:46 PM (15 years ago)
Author:
nanang
Message:

Ticket #771 (auddev-misc):
Updated audio test tool:

  • Fixed playback report on avg interval.
  • Added feature to set/get capture & playback latecies setting.
  • Minor update on drift calculation, improve a bit readibility for debugging.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia-audiodev/audiotest.c

    r2506 r2555  
    235235    result->play.min_interval = DIV_ROUND(test_data.playback_data.delay.min, 1000); 
    236236    result->play.max_interval = DIV_ROUND(test_data.playback_data.delay.max, 1000); 
    237     result->play.avg_interval = DIV_ROUND(test_data.capture_data.delay.mean, 1000); 
     237    result->play.avg_interval = DIV_ROUND(test_data.playback_data.delay.mean, 1000); 
    238238    result->play.dev_interval = DIV_ROUND(tmp, 1000); 
    239239    result->play.max_burst    = DIV_ROUND_UP(result->play.max_interval, ptime); 
     
    241241    /* Check drifting */ 
    242242    if (param->dir == PJMEDIA_DIR_CAPTURE_PLAYBACK) { 
    243         int end_diff, start_diff, drift; 
    244  
    245         end_diff = test_data.capture_data.last_timestamp - 
    246                    test_data.playback_data.last_timestamp; 
    247         start_diff = test_data.capture_data.first_timestamp- 
    248                       test_data.playback_data.first_timestamp; 
    249         drift = end_diff > start_diff? end_diff - start_diff : 
    250                 start_diff - end_diff; 
     243        int play_diff, cap_diff, drift; 
     244 
     245        play_diff = test_data.playback_data.last_timestamp - 
     246                    test_data.playback_data.first_timestamp; 
     247        cap_diff  = test_data.capture_data.last_timestamp - 
     248                    test_data.capture_data.first_timestamp; 
     249        drift = play_diff > cap_diff? play_diff - cap_diff : 
     250                cap_diff - play_diff; 
    251251 
    252252        /* Allow one frame tolerance for clock drift detection */ 
Note: See TracChangeset for help on using the changeset viewer.