[pjsip] pjsua: audio bursting

Peter Lukac p.lukac at emtest.sk
Mon Dec 14 09:11:29 EST 2009


Oh yes my mistake.
but.. :)

i run test...here is log:

PJSYSTEST Report
Time: 2009/12/11 11:49:40
Tests invoked: 13
-----------------------------------------------

TEST 0: Audio Device List Success
Found 5 devices
  0: PA [UCB1400:  (hw:0,0)] (2/2)
  1: PA [vystup] (0/2)
  2: PA [dsp0] (0/128)
  3: PA [default] (0/128)
  4: PA [/dev/dsp] (16/16)


TEST 1: Audio Settings Success
Version: 1.5
Test clock rate: 8000
Device clock rate: 8000
Aud frame ptime: 20
Channel count: 1
Audio switching: Conf bridge
Snd buff count: 8
Rec dev : -1 (UCB1400:  (hw:0,0)) [PA]
Rec  buf : 100 msec
Play dev: -2 (UCB1400:  (hw:0,0)) [PA]
Play buf: 140 msec


TEST 2: Audio Tone Playback Test Success

TEST 3: WAV File Playback Test Success

TEST 4: Audio Recording Success

TEST 5: Audio Device Test Success
Here are the audio statistics:
Rec : interval (min/max/avg/dev)=
         0/71/20/6 (ms)
      max burst=4
Play: interval (min/max/avg/dev)=
         0/71/20/6 (ms)
      burst=4

The sound device seems to be okay!

TEST 6: Audio Latency Test Success
The sound device latency:
 Min=157, Max=264, Avg=178


TEST 7: Audio Device Test Success
Here are the audio statistics:
Rec : interval (min/max/avg/dev)=
         0/61/20/5 (ms)
      max burst=4
Play: interval (min/max/avg/dev)=
         0/61/20/5 (ms)
      burst=4

The sound device seems to be okay!

TEST 8: Audio Tone Playback Test Success

TEST 9: Audio Tone Playback Test Success

TEST 10: WAV File Playback Test Success

TEST 11: WAV File Playback Test Success

TEST 12: Audio Latency Test Success
The sound device latency:
 Min=10, Max=155, Avg=48

I don't see what is wrong...how it can help me in my problem...?
All tests were successfully and i hear all and clear.

next... and again :)

One thing before i starting... word "bursting" in topic is not good...
it's like audio is omitting , drop-outs...
when i run countdown in original is it:
10 9 8 7 6 5 4 3 2 1 0
but i hear:
10 "stutters" 8 7 6 5 4 3 2 1 0

I create own aplication base on pjsua API. Is very similar with simple_pjsua.
this application run on my ARM device with CPU:

[root at device pjproject]# cat /proc/cpuinfo
Processor       : XScale-PXA255 rev 6 (v5l)
BogoMIPS        : 397.31
Features        : swp half thumb fastmult edsp
CPU implementer : 0x69
CPU architecture: 5TE
CPU variant     : 0x0
CPU part        : 0x2d0
CPU revision    : 6
Cache type      : undefined 5
Cache clean     : undefined 5
Cache lockdown  : undefined 5
Cache format    : Harvard
I size          : 32768
I assoc         : 32
I line length   : 32
I sets          : 32
D size          : 32768
D assoc         : 32
D line length   : 32
D sets          : 32

my media options:

	media_cfg.thread_cnt = 1;

//    i try experiment with this value but without success
	media_cfg.jb_init = 230;
	media_cfg.clock_rate = 8000;
	media_cfg.snd_clock_rate = 8000;
	media_cfg.ec_tail_len = 0;

//      more value give better results but not enough :)

	media_cfg.snd_play_latency = 400;
	media_cfg.no_vad = PJ_TRUE;

on second side (PC) i ussing pjsua application.

i try describe all cases from wiki:
http://trac.pjsip.org/repos/wiki/sound-problems


Types of Problems

   1. No audio is heard on local speaker during the call
	- it's ok
-----------------------------------------------------------------------
   2. No Audio is heard by remote party
	- it's ok
-----------------------------------------------------------------------
   3. Audio breakups
	- no
-----------------------------------------------------------------------
   4. Audio drop-outs or "stutters"
	- yes i think this is my problem

	   1. Check whether the symptom is observable when looping the microphone to
              the speaker locally.
	   2. Check that there is no dangling call in the PBX. A dangling call
              is call  that is left active in the PBX because previous (pjsua)
              application has crashed.
             - no this is ok

           3. Check for network impairments of incoming RTP packets
              - no i have local 100Mb network. here is dq from pjsua
 
  [DISCONNCTD] To: "pc2" <sip:pc2 at 192.168.10.123>;tag=as62decd28                        
    Call time: 00h:00m:44s, 1st res in 77 ms, conn in 79ms                              
    SRTP status: Not active Crypto-suite: (null)                                        
    #0 PCMA @8KHz, sendrecv, peer=-                                                     
       RX pt=8, stat last update: never                                                 
          total 1pkt 0B (40B +IP hdr) @avg=0bps/320.0Kbps                               
          pkt loss=0 (0.0%), discrd=0 (0.0%), dup=0 (0.0%), reord=0 (0.0%)              
                (msec)    min     avg     max     last    dev                           
          loss period:   0.000   0.000   0.000   0.000   0.000                          
          jitter     :   0.000   0.000   0.000   0.000   0.000                          
       TX pt=8, ptime=20ms, stat last update: never                                     
          total 1pkt 0B (40B +IP hdr) @avg 0bps/320.0Kbps                               
          pkt loss=0 (0.0%), dup=0 (0.0%), reorder=0 (0.0%)                             
                (msec)    min     avg     max     last    dev                           
          loss period:   0.000   0.000   0.000   0.000   0.000                          
          jitter     :   0.000   0.000   0.000   0.000   0.000                          
      RTT msec       :   0.000   0.000   0.000   0.000   0.000   

         4. Check that CPU Utilization is not Too High
           i turn off EC in pjsua --ec-tail 0. In my application i set
            media_cfg.ec_tail_len = 0;  CPU load is now cca 40-50%
           before 80-90%

         5. Try to enlarge PJMEDIA_SOUND_BUFFER_COUNT value by setting it in
          your pj/config_site.h. The default value is 6, and you can increase
          it to, say, 16. But be aware that enlarging this buffer will
          increase the audio latency, so you should find a minimum value where
          the sound quality doesn't break.

            I did but no change (i set to 16)...only log output is different
            from lot of logs like:
                   Master/sound  289 samples reduced, buf_cnt=2267                                                                            
                   Master/sound  Underflow, buf_cnt=122, will generate 1 frame                                                                

            i got 

 13:10:16.269   Master/sound  160 samples reduced, buf_cnt=1244                                                                            
 13:10:16.271   Master/sound  Buffer size adjusted from 1404 to 1244 
(eff_cnt=945)                                                         
 13:10:16.290   strm0x293f5c  JB shrinking 1 frame(s), cur size=37                                                                         
 13:10:16.397   Master/sound  197 samples reduced, buf_cnt=1047                                                                            
 13:10:16.400   Master/sound  Buffer size adjusted from 1244 to 1047 
(eff_cnt=945)                                                         
 13:10:16.496   strm0x293f5c  JB shrinking 1 frame(s), cur size=38                                                                         
 13:10:16.682   strm0x293f5c  JB shrinking 1 frame(s), cur size=37                                                                         
 13:10:16.913   strm0x293f5c  JB shrinking 1 frame(s), cur size=38                                                                         
 13:10:17.100   strm0x293f5c  JB shrinking 1 frame(s), cur size=37                                                                         
 13:10:17.318   strm0x293f5c  JB shrinking 1 frame(s), cur size=36                                                                         
 13:10:17.517   strm0x293f5c  JB shrinking 1 frame(s), cur size=37                                                                         
 13:10:17.734   strm0x293f5c  JB shrinking 1 frame(s), cur size=36                                                                         
 13:10:17.958   strm0x293f5c  JB shrinking 1 frame(s), cur size=36                                                                         
 13:10:18.278   strm0x293f5c  JB shrinking 1 frame(s), cur size=36                                                                         
 13:10:18.413   Master/sound  128 samples reduced, buf_cnt=2359      

         6. Check for audio underflows/overflows 
           i have underflows/overflows...and what can i do for minimum overflows?

-----------------------------------------------------------------------
   5. Loud static noise
    -no
-----------------------------------------------------------------------
   6. Soft/quiet noise
    -no
-----------------------------------------------------------------------
   7. Audio stutters when streaming tone to X-Lite/SJPhone
   - no
-----------------------------------------------------------------------
   8. High jitter value observed by remote party 
    i read 
      http://trac.pjsip.org/repos/wiki/audio-check-sound-device-jitter
    ...exist some solution for "bad" jitter?
-----------------------------------------------------------------------


All Checklists
-----------------------------------------------------------------------
   1. It's always recommended to check whether the problem exists with the 
latest SVN version of the libraries.

 -i try but same problem
-----------------------------------------------------------------------
   2. Check that the correct device is being used.
  - yes is.
-----------------------------------------------------------------------
   3. Check that no other application is using the devices. It is common to 
not be able to use sound device when the device is being used by other 
applications.
  - only my application using sound device
-----------------------------------------------------------------------
   4. Check that speaker is functioning properly by looping-back microphone to 
speaker device.
-----------------------------------------------------------------------
   5. You can also check that speaker is functioning properly by playing a WAV 
file to speaker.

when run pjsua as :

./pjsua-arm-unknown-linux-gnu  --clock-rate=8000 --snd-clock-rate=8000 --no-
vad --ec-tail=0  --playback-dev=3  --play-file cd8.wav 

and cc 1 0

...sometimes i hear stutters in sound.

-----------------------------------------------------------------------
   6. Check that incoming RTP packets are indeed received by local host
   - i think this is OK
-----------------------------------------------------------------------
   7. If no RTP packet is received, try this to get around NAT problems
	- i don't use NAT
-----------------------------------------------------------------------
   8. Check for high network jitter, packet loss, etc.
-----------------------------------------------------------------------
   9. Check that the call is connected to the sound device in the conference
bridge.
 - yes is.
-----------------------------------------------------------------------
  10. Check that CPU utilization is not too high
  - 40-50%
-----------------------------------------------------------------------
  11. Check that pjsua is transmitting RTP packet to the correct address
  - it's ok
-----------------------------------------------------------------------
  12. Check that codec is negotiated properly by both parties.
  - it's ok
-----------------------------------------------------------------------
  13. Checking the echo cancellation effectiveness?
  - i turn off EC
-----------------------------------------------------------------------
  14. Record the audio with pjsua for to hear it offline
-----------------------------------------------------------------------
  15. Check the performance of the sound device

  i want try sndtest but i can't find it. 
 is still in distibution?

..but i found pjmedia-test:

[root at device samples]# ./pjmedia-test-arm-unknown-linux-gnu 
 11:57:35.880 os_core_unix.c  pjlib 1.4.5 for POSIX initialized
Running sdp_neg_test()...                                      
  test 0: RFC 3264 example 10.1 (Alice's view)                 
  test 1: RFC 3264 example 10.1 (Bob's view)                   
  test 2: RFC 3264 example 10.2 (Alice's view)                 
  test 3: RFC 4317 section 2.1: Audio and Video 1 (Alice's view)
  test 4: RFC 4317 section 2.1: Audio and Video 1 (Bob's view)  
  test 5: RFC 4317 section 2.2: Audio and Video 2 (Alice's view)
  test 6: RFC 4317 section 2.2: Audio and Video 2 (Bob's view)  
  test 7: RFC 4317 section 2.4: Audio and Telephone-Events (Alice's view)
  test 8: RFC 4317 section 2.4: Audio and Telephone-Events (Bob's view)  
  test 9: RFC 4317 section 2.6: Audio with Telephone-Events (Alice's view)
  test 10: RFC 4317 section 2.6: Audio with Telephone-Events (Bob's view) 
  test 11: Ticket #527 scenario #1: Partial answer                        
  test 12: Ticket #527 scenario #1: Media mismatch in answer              
  test 13: Ticket #527 scenario #2: Modify offer - partial streams        
  test 14: Ticket #527 scenario #2: Modify offer - unordered m= lines     
  test 15: Ticket #527 scenario #2: Modify offer - partial & unordered streams
..success(0)                                                                  
Running jbuf_main()...                                                        


Ideal condition
jb updated(2), prefetch=1, size=0
------------------------------------------------------
Summary:                                              
  size=0 prefetch=1                                   
  delay (min/max/avg/dev)=20/20/20/0 ms               
  lost=0 discard=0 empty=0 burst(avg)=1               
JB summary: size=0 prefetch=1, delay (min/max/avg/dev)=20/20/20/0 ms, burst 
(min/max/avg/dev)=1/1/1/0 frames, lost=0 discard=0 empty=0


DTX
jb updated(2), prefetch=1, size=0
------------------------------------------------------
Summary:                                              
  size=0 prefetch=1                                   
  delay (min/max/avg/dev)=20/20/20/0 ms               
  lost=0 discard=0 empty=20 burst(avg)=1              
JB summary: size=0 prefetch=1, delay (min/max/avg/dev)=20/20/20/0 ms, burst 
(min/max/avg/dev)=1/1/1/0 frames, lost=0 discard=0 empty=20


Regular burst (three gets three puts)
jb updated(2), prefetch=3, size=2    
------------------------------------------------------
Summary:                                              
  size=0 prefetch=3                                   
  delay (min/max/avg/dev)=60/60/60/0 ms               
  lost=0 discard=0 empty=0 burst(avg)=3               
JB summary: size=0 prefetch=3, delay (min/max/avg/dev)=60/60/60/0 ms, burst 
(min/max/avg/dev)=3/3/3/0 frames, lost=0 discard=0 empty=0


Random burst (no drift)
jb updated(2), prefetch=1, size=2
jb updated(2), prefetch=3, size=2
JB shrinking 1 frame(s), cur size=6
jb updated(2), prefetch=4, size=5  
------------------------------------------------------
Summary:                                              
  size=3 prefetch=4                                   
  delay (min/max/avg/dev)=20/140/93/21 ms             
  lost=0 discard=1 empty=4 burst(avg)=2               
JB summary: size=3 prefetch=4, delay (min/max/avg/dev)=20/140/93/21 ms, burst 
(min/max/avg/dev)=1/4/2/0 frames, lost=0 discard=1 empty=4


Random burst (with drift, PUT > GET)
jb updated(2), prefetch=1, size=3   
jb updated(2), prefetch=3, size=2   
JB shrinking 1 frame(s), cur size=6 
jb updated(2), prefetch=4, size=6   
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=8 
------------------------------------------------------
Summary:                                              
  size=5 prefetch=4                                   
  delay (min/max/avg/dev)=40/200/139/23 ms            
  lost=0 discard=65 empty=2 burst(avg)=2              
JB summary: size=5 prefetch=4, delay (min/max/avg/dev)=40/200/139/23 ms, burst 
(min/max/avg/dev)=1/4/2/0 frames, lost=0 discard=65 empty=2


Random burst (with drift, PUT < GET)
jb updated(2), prefetch=1, size=2   
jb updated(2), prefetch=3, size=2   
jb updated(2), prefetch=4, size=5   
------------------------------------------------------
Summary:                                              
  size=2 prefetch=4                                   
  delay (min/max/avg/dev)=20/120/83/23 ms             
  lost=0 discard=0 empty=68 burst(avg)=2              
JB summary: size=2 prefetch=4, delay (min/max/avg/dev)=20/120/83/23 ms, burst 
(min/max/avg/dev)=1/4/2/0 frames, lost=0 discard=0 empty=68


Packet lost
jb updated(2), prefetch=1, size=0
Lost                             
Lost                             
Lost                             
Lost                             
jb updated(2), prefetch=3, size=2
Lost                             
Lost                             
Lost                             
------------------------------------------------------
Summary:                                              
  size=0 prefetch=3                                   
  delay (min/max/avg/dev)=20/60/23/10 ms              
  lost=4 discard=0 empty=3 burst(avg)=1               
JB summary: size=0 prefetch=3, delay (min/max/avg/dev)=20/60/23/10 ms, burst 
(min/max/avg/dev)=1/3/1/0 frames, lost=4 discard=0 empty=3


Sequence restart
jb updated(2), prefetch=1, size=0
Sequence restarting, from 120 to 1
------------------------------------------------------
Summary:                                              
  size=0 prefetch=1                                   
  delay (min/max/avg/dev)=20/20/20/0 ms               
  lost=0 discard=0 empty=0 burst(avg)=1               
JB summary: size=0 prefetch=1, delay (min/max/avg/dev)=20/20/20/0 ms, burst 
(min/max/avg/dev)=1/1/1/0 frames, lost=0 discard=0 empty=0


Duplicated frames
e.g.: some Forward Error Correction (FEC) methods.
jb updated(2), prefetch=1, size=0                 
------------------------------------------------------
Summary:                                              
  size=0 prefetch=1                                   
  delay (min/max/avg/dev)=20/20/20/0 ms               
  lost=0 discard=40 empty=0 burst(avg)=1              
JB summary: size=0 prefetch=1, delay (min/max/avg/dev)=20/20/20/0 ms, burst 
(min/max/avg/dev)=1/1/1/0 frames, lost=0 discard=40 empty=0


Late frames
jb updated(2), prefetch=1, size=0
Lost                             
Lost                             
Lost                             
Lost                             
------------------------------------------------------
Summary:                                              
  size=0 prefetch=1                                   
  delay (min/max/avg/dev)=20/20/20/0 ms               
  lost=0 discard=4 empty=4 burst(avg)=1               
JB summary: size=0 prefetch=1, delay (min/max/avg/dev)=20/20/20/0 ms, burst 
(min/max/avg/dev)=1/1/1/0 frames, lost=0 discard=4 empty=4


PUT burst at the beginning
jb updated(2), prefetch=1, size=38
JB shrinking 1 frame(s), cur size=37
JB shrinking 1 frame(s), cur size=36
JB shrinking 1 frame(s), cur size=35
JB shrinking 1 frame(s), cur size=34
JB shrinking 1 frame(s), cur size=33
JB shrinking 1 frame(s), cur size=32
JB shrinking 1 frame(s), cur size=31
JB shrinking 1 frame(s), cur size=30
JB shrinking 1 frame(s), cur size=29
JB shrinking 1 frame(s), cur size=28
JB shrinking 1 frame(s), cur size=27
JB shrinking 1 frame(s), cur size=26
JB shrinking 1 frame(s), cur size=25
JB shrinking 1 frame(s), cur size=24
JB shrinking 1 frame(s), cur size=23
JB shrinking 1 frame(s), cur size=22
JB shrinking 1 frame(s), cur size=21
JB shrinking 1 frame(s), cur size=20
JB shrinking 1 frame(s), cur size=19
JB shrinking 1 frame(s), cur size=18
JB shrinking 1 frame(s), cur size=17
JB shrinking 1 frame(s), cur size=16
JB shrinking 1 frame(s), cur size=15
JB shrinking 1 frame(s), cur size=14
JB shrinking 1 frame(s), cur size=13
JB shrinking 1 frame(s), cur size=12
JB shrinking 1 frame(s), cur size=11
JB shrinking 1 frame(s), cur size=10
JB shrinking 1 frame(s), cur size=9 
JB shrinking 1 frame(s), cur size=8 
JB shrinking 1 frame(s), cur size=7 
JB shrinking 1 frame(s), cur size=6 
JB shrinking 1 frame(s), cur size=5 
JB shrinking 1 frame(s), cur size=4 
JB shrinking 1 frame(s), cur size=3 
------------------------------------------------------
Summary:                                              
  size=3 prefetch=1                                   
  delay (min/max/avg/dev)=80/780/430/202 ms           
  lost=0 discard=47 empty=0 burst(avg)=1              
JB summary: size=3 prefetch=1, delay (min/max/avg/dev)=80/780/430/202 ms, 
burst (min/max/avg/dev)=1/1/1/0 frames, lost=0 discard=47 empty=0


Fixed mode prefetch 5, with two empty events
PUT prefetch_cnt=1/5                        
GET prefetch_cnt=1/5                        
PUT prefetch_cnt=2/5                        
GET prefetch_cnt=2/5                        
PUT prefetch_cnt=3/5                        
GET prefetch_cnt=3/5                        
PUT prefetch_cnt=4/5                        
GET prefetch_cnt=4/5                        
PUT prefetch_cnt=5/5                        
PUT prefetch_cnt=1/5                        
GET prefetch_cnt=1/5                        
PUT prefetch_cnt=2/5                        
GET prefetch_cnt=2/5                        
PUT prefetch_cnt=3/5                        
GET prefetch_cnt=3/5                        
PUT prefetch_cnt=4/5                        
GET prefetch_cnt=4/5                        
PUT prefetch_cnt=5/5                        
------------------------------------------------------
Summary:                                              
  size=4 prefetch=5                                   
  delay (min/max/avg/dev)=100/100/100/0 ms            
  lost=0 discard=0 empty=10 burst(avg)=1              
JB summary: size=4 prefetch=5, delay (min/max/avg/dev)=100/100/100/0 ms, burst 
(min/max/avg/dev)=1/1/1/0 frames, lost=0 discard=0 empty=10


Fixed mode prefetch 5, with random burst
PUT prefetch_cnt=1/5                    
PUT prefetch_cnt=2/5                    
PUT prefetch_cnt=3/5                    
GET prefetch_cnt=3/5                    
PUT prefetch_cnt=4/5                    
PUT prefetch_cnt=5/5                    
jb updated(1), prefetch=5, size=4       
------------------------------------------------------
Summary:                                              
  size=4 prefetch=5                                   
  delay (min/max/avg/dev)=20/160/109/27 ms            
  lost=0 discard=0 empty=4 burst(avg)=2               
JB summary: size=4 prefetch=5, delay (min/max/avg/dev)=20/160/109/27 ms, burst 
(min/max/avg/dev)=1/4/2/0 frames, lost=0 discard=0 empty=4


Fixed mode prefetch 10, PUT burst at the beginning
JB shrinking 1 frame(s), cur size=37              
JB shrinking 1 frame(s), cur size=36              
JB shrinking 1 frame(s), cur size=35              
JB shrinking 1 frame(s), cur size=34              
JB shrinking 1 frame(s), cur size=33              
JB shrinking 1 frame(s), cur size=32              
JB shrinking 1 frame(s), cur size=31              
JB shrinking 1 frame(s), cur size=30              
JB shrinking 1 frame(s), cur size=29              
JB shrinking 1 frame(s), cur size=28              
jb updated(1), prefetch=10, size=28               
JB shrinking 1 frame(s), cur size=27              
JB shrinking 1 frame(s), cur size=26              
JB shrinking 1 frame(s), cur size=25              
JB shrinking 1 frame(s), cur size=24              
JB shrinking 1 frame(s), cur size=23              
JB shrinking 1 frame(s), cur size=22              
JB shrinking 1 frame(s), cur size=21              
JB shrinking 1 frame(s), cur size=20              
JB shrinking 1 frame(s), cur size=20              
jb updated(1), prefetch=10, size=19               
jb updated(1), prefetch=10, size=19               
------------------------------------------------------
Summary:                                              
  size=19 prefetch=10                                 
  delay (min/max/avg/dev)=400/780/503/124 ms          
  lost=0 discard=31 empty=0 burst(avg)=1              
JB summary: size=19 prefetch=10, delay (min/max/avg/dev)=400/780/503/124 ms, 
burst (min/max/avg/dev)=1/1/1/0 frames, lost=0 discard=31 empty=0                                                                                                                                        


..success(0)
Running mips_test()...
MIPS test, with CPU=2666Mhz, 8102.0 MIPS
Clock  Item                                      Time     CPU    MIPS
 Rate                                           (usec)    (%)        
----------------------------------------------------------------------
 8KHz get from memplayer                          129    0.013    1.05
 8KHz conference bridge with 1 call              9506    0.951   77.02
 8KHz conference bridge with 2 calls            16772    1.677  135.89
 8KHz conference bridge with 4 calls            31335    3.134  253.88
 8KHz conference bridge with 8 calls            60212    6.021  487.84
 8KHz conference bridge with 16 calls          119009   11.901  964.21
 8KHz upsample+downsample - linear              10421    1.042   84.43
 8KHz upsample+downsample - small filter       128224   12.822 1038.87
 8KHz upsample+downsample - large filter       897345   89.734 7270.27
 8KHz WSOLA PLC - 0% loss                        2748    0.275   22.26
 8KHz WSOLA PLC - 2% loss                       10013    1.001   81.13
 8KHz WSOLA PLC - 5% loss                       18980    1.898  153.78
 8KHz WSOLA PLC - 10% loss                      31781    3.178  257.49
 8KHz WSOLA PLC - 20% loss                      53963    5.396  437.21
 8KHz WSOLA PLC - 50% loss                     141210   14.121 1144.08
 8KHz WSOLA discard 2% excess                    3424    0.342   27.74
 8KHz WSOLA discard 5% excess                    7445    0.744   60.32
 8KHz WSOLA discard 10% excess                  17479    1.748  141.61
 8KHz WSOLA discard 20% excess                  31392    3.139  254.34
 8KHz WSOLA discard 50% excess                  85204    8.520  690.32
 8KHz Delay buffer                               1330    0.133   10.78
 8KHz Delay buffer - drift -2%                   3147    0.315   25.50
 8KHz Delay buffer - drift -5%                   9978    0.998   80.84
 8KHz Delay buffer - drift -10%                 38234    3.823  309.77
 8KHz Delay buffer - drift -20%                 44931    4.493  364.03
 8KHz Delay buffer - drift +2%                   1840    0.184   14.91
 8KHz Delay buffer - drift +5%                   6372    0.637   51.63
 8KHz Delay buffer - drift +10%                 15178    1.518  122.97
 8KHz Delay buffer - drift +20%                 35845    3.585  290.42
 8KHz echo canceller 100ms tail len           1516726  151.673 12288.47
 8KHz echo canceller 128ms tail len           1607129  160.713 13020.92
 8KHz echo canceller 200ms tail len           1890591  189.059 15317.52
 8KHz echo canceller 256ms tail len           2020147  202.015 16367.18
 8KHz echo canceller 400ms tail len           2383090  238.309 19307.73
 8KHz echo canceller 500ms tail len           2614023  261.402 21178.75
 8KHz echo canceller 512ms tail len           2674343  267.434 21667.46
 8KHz echo canceller 600ms tail len           2904143  290.414 23529.29
 8KHz echo canceller 800ms tail len           3452865  345.286 27975.02
 8KHz echo suppressor 100ms tail len             3659    0.366   29.65 
 8KHz echo suppressor 128ms tail len             3611    0.361   29.26 
 8KHz echo suppressor 200ms tail len             4118    0.412   33.36 
 8KHz echo suppressor 256ms tail len             4534    0.453   36.73 
 8KHz echo suppressor 400ms tail len             3471    0.347   28.12 
 8KHz echo suppressor 500ms tail len             3654    0.365   29.60 
 8KHz echo suppressor 512ms tail len             3714    0.371   30.09 
 8KHz echo suppressor 600ms tail len             4374    0.437   35.44 
 8KHz echo suppressor 800ms tail len             3561    0.356   28.85 
 8KHz tone generator with single freq            5364    0.536   43.46 
 8KHz tone generator with dual freq             10711    1.071   86.78 
 8KHz codec encode/decode - G.711                3469    0.347   28.11 
 8KHz codec encode/decode - GSM                181303   18.130 1468.91 
 8KHz codec encode/decode - iLBC              2441245  244.124 19778.90
 8KHz codec encode/decode - Speex 8Khz        2933743  293.374 23769.11
 8KHz codec encode/decode - L16/8000/1           4639    0.464   37.59 
 8KHz stream TX/RX - G.711                       8751    0.875   70.90 
 8KHz stream TX/RX - G.711 SRTP 32bit           33008    3.301  267.43 
 8KHz stream TX/RX - G.711 SRTP 32bit +auth     55923    5.592  453.09 
 8KHz stream TX/RX - G.711 SRTP 80bit           32893    3.289  266.50 
 8KHz stream TX/RX - G.711 SRTP 80bit +auth     56366    5.637  456.68 
 8KHz stream TX/RX - GSM                       197410   19.741 1599.41 
 8KHz stream TX/RX - GSM SRTP 32bit            208143   20.814 1686.37 
 8KHz stream TX/RX - GSM SRTP 32bit + auth     222128   22.213 1799.68 
 8KHz stream TX/RX - GSM SRTP 80bit            208449   20.845 1688.85 
 8KHz stream TX/RX - GSM SRTP 80bit + auth     222037   22.204 1798.94 
16KHz get from memplayer                          177    0.018    1.43 
16KHz conference bridge with 1 call             18684    1.868  151.38 
16KHz conference bridge with 2 calls            32853    3.285  266.17 
16KHz conference bridge with 4 calls            61978    6.198  502.14 
16KHz conference bridge with 8 calls           119458   11.946  967.85 
16KHz conference bridge with 16 calls          244412   24.441 1980.22 
16KHz upsample+downsample - linear              20448    2.045  165.67 
16KHz upsample+downsample - small filter       256476   25.648 2077.96 
16KHz upsample+downsample - large filter      2141795  214.180 17352.77
16KHz WSOLA PLC - 0% loss                        9203    0.920   74.56 
16KHz WSOLA PLC - 2% loss                       30866    3.087  250.08 
16KHz WSOLA PLC - 5% loss                       76818    7.682  622.38 
16KHz WSOLA PLC - 10% loss                     135138   13.514 1094.88 
16KHz WSOLA PLC - 20% loss                     222824   22.282 1805.31 
16KHz WSOLA PLC - 50% loss                     466798   46.680 3781.99 
16KHz WSOLA discard 2% excess                    5795    0.580   46.95 
16KHz WSOLA discard 5% excess                   27074    2.707  219.35 
16KHz WSOLA discard 10% excess                  52516    5.252  425.48 
16KHz WSOLA discard 20% excess                 106398   10.640  862.03 
16KHz WSOLA discard 50% excess                 319915   31.992 2591.94 
16KHz Delay buffer                               2749    0.275   22.27 
16KHz Delay buffer - drift -2%                  11424    1.142   92.56 
16KHz Delay buffer - drift -5%                  33061    3.306  267.86 
16KHz Delay buffer - drift -10%                 65210    6.521  528.33 
16KHz Delay buffer - drift -20%                109225   10.922  884.94 
16KHz Delay buffer - drift +2%                   8529    0.853   69.10 
16KHz Delay buffer - drift +5%                  18409    1.841  149.15 
16KHz Delay buffer - drift +10%                 51252    5.125  415.24 
16KHz Delay buffer - drift +20%                143666   14.367 1163.98 
16KHz echo canceller 100ms tail len           3297001  329.700 26712.22
16KHz echo canceller 128ms tail len           3486102  348.610 28244.31
16KHz echo canceller 200ms tail len           3907900  390.790 31661.71
16KHz echo canceller 256ms tail len           4169448  416.945 33780.76
16KHz echo canceller 400ms tail len           4786086  478.609 38776.75
16KHz echo canceller 500ms tail len           5358460  535.846 43414.11
16KHz echo canceller 512ms tail len           5442987  544.299 44098.94
16KHz echo canceller 600ms tail len           5932118  593.212 48061.87
16KHz echo canceller 800ms tail len           6783989  678.399 54963.70
16KHz echo suppressor 100ms tail len            11336    1.134   91.84 
16KHz echo suppressor 128ms tail len            11659    1.166   94.46 
16KHz echo suppressor 200ms tail len             5688    0.569   46.08 
16KHz echo suppressor 256ms tail len             5707    0.571   46.24 
16KHz echo suppressor 400ms tail len             5887    0.589   47.70 
16KHz echo suppressor 500ms tail len             6127    0.613   49.64 
16KHz echo suppressor 512ms tail len             5921    0.592   47.97 
16KHz echo suppressor 600ms tail len             5792    0.579   46.93 
16KHz echo suppressor 800ms tail len             5599    0.560   45.36 
16KHz tone generator with single freq           10221    1.022   82.81 
16KHz tone generator with dual freq             20545    2.055  166.46 
16KHz codec encode/decode - G.722              259129   25.913 2099.46 
16KHz codec encode/decode - Speex 16Khz       6523109  652.311 52850.06
16KHz codec encode/decode - L16/16000/1          8811    0.881   71.39 
16KHz stream TX/RX - G.722                     282191   28.219 2286.30 
..success(0)                                                           
Running codec_test_vectors()...                                        
  encode tests:                                                        
  decode tests:                                                        
..success(0)                                                           
                                                                       
Looks like everything is okay!        
----------------------------------------------------------------------


  16. Check for audio underflows/overflows 
-----------------------------------------------------------------------




...and little example:
i run my aplication on ARM and pjsua application on PC:

You can hear drop-out in record.wav at cca 30s.

original sound and record sound:

http://158.193.202.22/~focus/sounds.tar.gz



that is all :)


can my somebody help? i don't know what is wrong i don't understand what is 
inside pjsua core and don't want read source code :) 

i just want know what mean and how can i prevent these logs:

233 samples reduced, buf_cnt=877
Master/sound  Underflow, buf_cnt=0, will generate 1 frame
JB shrinking 1 frame(s), cur size=32
jb updated(1), prefetch=12, size=3



PS: i try last PortAudio library and same problem...

thanks


> pjsystest != pjsip-test ;-)
>
> Btw, seems that there have been a number of reports regarding audio
> device issues, especially linux/ARM. There has been plan to do
> something about this, e.g: upgrading to newer PA version. Meanwhile,
> self trying to upgrade PA or checking PA forums/lists/KB could be
> useful :)
>
> BR,
> nanang







More information about the pjsip mailing list