[SIP SIMPLE client] Audio problems

Adrian Georgescu ag at ag-projects.com
Wed Jan 19 17:45:54 CET 2011


Hello Santiago,

I have heard similar reports about audio issues on Linux systems and could not find the culprit for them yet. On some systems it works just well, on others we get 100% cpu usage or no audio at all. On Windows and Mac it works fine on the other hand.

Is hard to tell what triggers this behavior on Linux. If we can find the reason we may be able to fix it.

Adrian

On Jan 19, 2011, at 1:47 PM, Santiago Gimeno wrote:

> Hello,
> 
> I've been using the SDK to develop an application for a couple of months and so far so good until audio problems issues have appeared.
> 
> When a call is established between the application and another softphone, sometimes an annoying buzz is heard on the softphone end.
> I have captured the rtp traffic and the noise is introduced in the side of the application.
> Then, I wanted to check if the audio was produced by the sound card or the application. I'm using a handset device with a sound card integrated as input and output device, and I couldn't play or record any data at the same time the device was being used by the application. So I have followed the tutorial on: http://sipsimpleclient.com/wiki/SipAudioDeviceSharingLinux, and another issue have appeared: while I can play lots of files simultaneously using aplay: for example: "$ aplay -D default /usr/share/blink/sounds/beeping_ringtone.wav", the application doesn't play audio anymore, I even though I have configured both input_device and output_device to use the default device.
> By checking the pjsip trace I can't see anything wrong, it looks like the device is opened with no errors:
> 
> 
> 2011-01-19 13:22:50.853000 [phone.pyc 2187] (4)      pasound.c: PortAudio sound library initialized, status=0
> 2011-01-19 13:22:50.853000 [phone.pyc 2187] (4)      pasound.c: PortAudio host api count=2
> 2011-01-19 13:22:50.853000 [phone.pyc 2187] (4)      pasound.c: Sound device count=15
> 2011-01-19 13:22:50.880000 [phone.pyc 2187] (5)      pasound.c: Opened device default(ALSA)/default(ALSA) for recording and playback, sample rate=44100, ch=1, bits=16, 882 samples per frame, input latency=100 ms, output latency=100 ms
> 2011-01-19 13:22:50.880000 [phone.pyc 2187] (5)      pasound.c: Starting default stream..
> 2011-01-19 13:22:50.880000 [phone.pyc 2187] (5)      pasound.c: Done, status=0
> 2011-01-19 13:22:50.890000 [phone.pyc 2187] (5)      pasound.c: Opened device 14: default(ALSA) for playing, sample rate=44100, ch=1, bits=16, 882 samples per frame, latency=100 ms
> 2011-01-19 13:22:50.890000 [phone.pyc 2187] (5)      pasound.c: Starting default stream..
> 2011-01-19 13:22:50.890000 [phone.pyc 2187] (5)      pasound.c: Done, status=0
> 2011-01-19 13:22:50.945000 [phone.pyc 2187] (5)      pasound.c: Player thread started
> 2011-01-19 13:22:50.981000 [phone.pyc 2187] (5)      pasound.c: Recorder thread started
> 2011-01-19 13:22:50.981000 [phone.pyc 2187] (5)      pasound.c: Player thread started
> 
> 
> And when a try to play a wav file, no errors are reported:
> 
> 
> ==> /home/sgimeno/.phone/notifications_trace.txt <==
> 2011-01-19 13:30:31.989499 [phone.pyc 2187]: Notification name=AudioPortDidChangeSlots sender=<sipsimple.audio.WavePlayer object at 0xa74ad2c>
> {'consumer_slot_changed': False,
>  'new_producer_slot': None,
>  'old_producer_slot': None,
>  'producer_slot_changed': True,
>  'timestamp': datetime.datetime(2011, 1, 19, 13, 30, 31, 988983)}
> 2011-01-19 13:30:31.989700 [phone.pyc 2187]: Notification name=WavePlayerDidEnd sender=<sipsimple.audio.WavePlayer object at 0xa74ad2c>
> {'timestamp': datetime.datetime(2011, 1, 19, 13, 30, 31, 989090)}
> 2011-01-19 13:30:31.990557 [phone.pyc 2187]: Notification name=WavePlayerDidStart sender=<sipsimple.audio.WavePlayer object at 0xa1d5fec>
> {'timestamp': datetime.datetime(2011, 1, 19, 13, 30, 31, 990257)}
> 2011-01-19 13:30:31.991000 [phone.pyc 2187]: Notification name=AudioPortDidChangeSlots sender=<sipsimple.audio.WavePlayer object at 0xa1d5fec>
> {'consumer_slot_changed': False,
>  'new_producer_slot': 1,
>  'old_producer_slot': None,
>  'producer_slot_changed': True,
>  'timestamp': datetime.datetime(2011, 1, 19, 13, 30, 31, 990306)}
> 2011-01-19 13:30:31.991224 [ionphone.pyc 2187]: Notification name=Play sender=<InputThread(Thread-2, started daemon -1231606928)>
> {'count': -1, 'pause': -1, 'tone': 'dtmf_1_tone', 'volume': 70}
> 2011-01-19 13:30:32.042914 [ionphone.pyc 2187]: Notification name=WaveFileDidFinishPlaying sender=<sipsimple.core._core.WaveFile object at 0xa70c42c>
> {'timestamp': datetime.datetime(2011, 1, 19, 13, 30, 31, 988961)}
> 
> ==> /home/sgimeno/.phone/pjsip_trace.txt <==
> 2011-01-19 13:30:31.990000 [phone.pyc 2187] (4)   wav_player.c: File player '/usr/share/blink/sounds/dtmf_1_tone.wav' created: samp.rate=32000, ch=1, bufsize=4KB, filesize=32KB
> 2011-01-19 13:30:31.990000 [phone.pyc 2187] (5)     resample.c: resample created: high qualiy, large filter, in/out rate=32000/44100
> 2011-01-19 13:30:31.990000 [phone.pyc 2187] (5)     resample.c: resample created: high qualiy, large filter, in/out rate=44100/32000
> 2011-01-19 13:30:31.990000 [iphone.pyc 2187] (4)   conference.c: Port 1 (/usr/share/blink/sounds/dtmf_1_tone.wav) transmitting to port 0 (Master/sound)
> 
> 
> In sort, I'm a bit lost and any ideas on these issues would be much appreciated.
> 
> Thanks,
> 
> Best regards,
> 
> Santi
> 
> _______________________________________________
> SIPclient mailing list
> SIPclient at lists.ag-projects.com
> http://lists.ag-projects.com/mailman/listinfo/sipclient

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ag-projects.com/pipermail/sipbeyondvoip/attachments/20110119/38e9c129/attachment-0001.html>


More information about the SIPBeyondVoIP mailing list