Changes between Version 3 and Version 4 of audio-problem-dropouts


Ignore:
Timestamp:
Jan 18, 2007 2:46:06 AM (17 years ago)
Author:
bennylp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • audio-problem-dropouts

    v3 v4  
    77The audio is sounding like it's skipping some frames. 
    88 
    9 Sample WAV file:  
    10 http://www.pjsip.org/trac/attachment/wiki/audio-problem-dropouts/stutter.wav?format=raw 
     9== Sample WAV File == 
    1110 
    12 In the WAV file above, you can hear the stutters at 2.5 second, 3.8 second, 8.8 second. 
     11See the attachment on the bottom of this page. You can hear the stutters at 2.5 second, 3.8 second, 8.8 second. 
    1312 
    1413 
    1514== Checklists == 
    16 Checklists: 
     15Here are the checklists related to stutters problem: 
    1716 1. [wiki:audio-check-loopback Check whether the symptom is observable when looping the microphone to the speaker locally]. 
    1817 1. [wiki:audio-check-packet-loss Check for network impairments of incoming RTP packets] 
     
    2221== Windows Mobile Workaround == 
    2322 
    24 Some people have observed stutters on Windows Mobile devices, and it turns out that this was caused by frame duration setting that is set too low. The usual settings for frame duration is 10ms or 20ms, and it seems that Windows Mobile just can't handle this. Increasing the frame duration to 80ms seems to cure the problem. 
     23Some people have observed stutters on Windows Mobile devices, and it turns out that this was caused by '''frame duration or {{{samples_per_frame}}} setting that is set too low when opening the sound device'''.  
     24 
     25The usual settings for frame duration is 10ms or 20ms, and it seems that Windows Mobile just can't handle this. Increasing the frame duration to 80ms seems to cure the problem. 
    2526 
    2627Example: 
    2728 
    28 This sets the frame duration to 20ms: 
    2929{{{ 
    30  int samples_per_frame = clock_rate * 20 / 1000; 
     30 #define PTIME 20 
     31 
     32  int clock_rate = 8000; 
     33  int channel_count = 1; 
     34  int samples_per_frame = clock_rate * PTIME / 1000; 
     35  int bits_per_sample = 16; 
     36 
     37 
     38  status = pjmedia_conf_create( pool,         /* pool to use        */ 
     39                                port_count,   /* number of ports    */ 
     40                                clock_rate, 
     41                                channel_count, 
     42                                samples_per_frame, 
     43                                bits_per_sample, 
     44                                0,            /* options            */ 
     45                                &conf         /* result             */ 
     46                                ); 
    3147}}} 
    3248 
    33 While this would set the frame duration to 80ms: 
    34 {{{ 
    35  int samples_per_frame = clock_rate * 80 / 1000;  
    36 }}} 
     49The snippet above will create a conference bridge '''with internal sound device''', using frame duration setting of 20ms (the PTIME macro). To fix the stutter problem, change PTIME to 80. 
     50