Hello Alexei, PJmedia through Portaudio does not suport addition or removal of audio devices on the fly. If you use a Mac you can try what we did to support this that works fine in Blink: http://sipsimpleclient.com/ticket/75 You need to patch both portaudio and pjsip to make it work correctly. Also read though the ticket for how to work around the multithreading issues in your client. Regards, Adrian On Feb 14, 2010, at 12:13 PM, Alexei Kuznetsov wrote: > Hi, > > I?m testing pjproject-1.5.5 on Mac OS X 10.6.2. I?m running pjsua > for the test. > > When I?m plugging or unplugging headphones during a call, I?m getting > this (starting from 14:06:21.173): > 14:06:14.293 pjsua_app.c Call 1 state changed to CONFIRMED > 14:06:14.295 Master/sound Underflow, buf_cnt=0, will generate 1 > frame > 14:06:14.376 sound_port.c EC activated > 14:06:14.835 Master/sound Underflow, buf_cnt=0, will generate 1 > frame > 14:06:14.916 strm0x1008879c VAD re-enabled > 14:06:21.173 Master/sound Buffer size adjusted from 1280 to 1118 > (eff_cnt=910) > 14:06:21.595 Master/sound Buffer size adjusted from 1438 to 1002 > (eff_cnt=910) > 14:06:21.914 Master/sound Buffer size adjusted from 1322 to 1068 > (eff_cnt=910) > 14:06:22.233 ec0x100601ff0 Underflow, buf_cnt=3, will generate 1 > frame > 14:06:22.255 Master/sound Buffer size adjusted from 1388 to 1179 > (eff_cnt=910) > 14:06:22.378 Master/sound Buffer size adjusted from 1179 to 718 > (eff_cnt=842) > 14:06:22.633 ec0x100601ff0 Underflow, buf_cnt=3, will generate 1 > frame > 14:06:22.973 ec0x100601ff0 Underflow, buf_cnt=3, will generate 1 > frame > 14:06:23.075 Master/sound Buffer size adjusted from 1358 to 899 > (eff_cnt=842) > 14:06:23.373 ec0x100601ff0 Underflow, buf_cnt=3, will generate 1 > frame > 14:06:23.396 Master/sound Buffer size adjusted from 1219 to 963 > (eff_cnt=842) > 14:06:23.635 ec0x100601ff0 Underflow, buf_cnt=3, will generate 1 > frame > > And so on until I hang up the call. > > Any thoughts? > > Alexei > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20100218/c308da06/attachment.html>