Hello,<br><br>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.<br>
<br>When a call is established between the application and another softphone, sometimes an annoying buzz is heard on the softphone end.<br>I have captured the rtp traffic and the noise is introduced in the side of the application.<br>
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: <a href="http://sipsimpleclient.com/wiki/SipAudioDeviceSharingLinux">http://sipsimpleclient.com/wiki/SipAudioDeviceSharingLinux</a>, 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.<br>
By checking the pjsip trace I can't see anything wrong, it looks like the device is opened with no errors:<br><br><br>2011-01-19 13:22:50.853000 [phone.pyc 2187] (4) pasound.c: PortAudio sound library initialized, status=0<br>
2011-01-19 13:22:50.853000 [phone.pyc 2187] (4) pasound.c: PortAudio host api count=2<br>2011-01-19 13:22:50.853000 [phone.pyc 2187] (4) pasound.c: Sound device count=15<br>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<br>
2011-01-19 13:22:50.880000 [phone.pyc 2187] (5) pasound.c: Starting default stream..<br>2011-01-19 13:22:50.880000 [phone.pyc 2187] (5) pasound.c: Done, status=0<br>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<br>
2011-01-19 13:22:50.890000 [phone.pyc 2187] (5) pasound.c: Starting default stream..<br>2011-01-19 13:22:50.890000 [phone.pyc 2187] (5) pasound.c: Done, status=0<br>2011-01-19 13:22:50.945000 [phone.pyc 2187] (5) pasound.c: Player thread started<br>
2011-01-19 13:22:50.981000 [phone.pyc 2187] (5) pasound.c: Recorder thread started<br>2011-01-19 13:22:50.981000 [phone.pyc 2187] (5) pasound.c: Player thread started<br><br><br>And when a try to play a wav file, no errors are reported:<br>
<br><br>==> /home/sgimeno/.phone/notifications_trace.txt <==<br>2011-01-19 13:30:31.989499 [phone.pyc 2187]: Notification name=AudioPortDidChangeSlots sender=<sipsimple.audio.WavePlayer object at 0xa74ad2c><br>
{'consumer_slot_changed': False,<br> 'new_producer_slot': None,<br> 'old_producer_slot': None,<br> 'producer_slot_changed': True,<br> 'timestamp': datetime.datetime(2011, 1, 19, 13, 30, 31, 988983)}<br>
2011-01-19 13:30:31.989700 [phone.pyc 2187]: Notification name=WavePlayerDidEnd sender=<sipsimple.audio.WavePlayer object at 0xa74ad2c><br>{'timestamp': datetime.datetime(2011, 1, 19, 13, 30, 31, 989090)}<br>
2011-01-19 13:30:31.990557 [phone.pyc 2187]: Notification name=WavePlayerDidStart sender=<sipsimple.audio.WavePlayer object at 0xa1d5fec><br>{'timestamp': datetime.datetime(2011, 1, 19, 13, 30, 31, 990257)}<br>
2011-01-19 13:30:31.991000 [phone.pyc 2187]: Notification name=AudioPortDidChangeSlots sender=<sipsimple.audio.WavePlayer object at 0xa1d5fec><br>{'consumer_slot_changed': False,<br> 'new_producer_slot': 1,<br>
'old_producer_slot': None,<br> 'producer_slot_changed': True,<br> 'timestamp': datetime.datetime(2011, 1, 19, 13, 30, 31, 990306)}<br>2011-01-19 13:30:31.991224 [ionphone.pyc 2187]: Notification name=Play sender=<InputThread(Thread-2, started daemon -1231606928)><br>
{'count': -1, 'pause': -1, 'tone': 'dtmf_1_tone', 'volume': 70}<br>2011-01-19 13:30:32.042914 [ionphone.pyc 2187]: Notification name=WaveFileDidFinishPlaying sender=<sipsimple.core._core.WaveFile object at 0xa70c42c><br>
{'timestamp': datetime.datetime(2011, 1, 19, 13, 30, 31, 988961)}<br><br>==> /home/sgimeno/.phone/pjsip_trace.txt <==<br>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<br>
2011-01-19 13:30:31.990000 [phone.pyc 2187] (5) resample.c: resample created: high qualiy, large filter, in/out rate=32000/44100<br>2011-01-19 13:30:31.990000 [phone.pyc 2187] (5) resample.c: resample created: high qualiy, large filter, in/out rate=44100/32000<br>
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)<br><br><br>In sort, I'm a bit lost and any ideas on these issues would be much appreciated.<br>
<br>Thanks,<br><br>Best regards,<br><br>Santi<br><br>