Hi Alexei, On 10 Nov 2008, at 12:26, Alexei Kuznetsov wrote: > Hi Ruud, > >>> I mean, the application uses 10% of cpu without any media active. >>> Also, pjsua without any params uses less than 1% cpu after start-up, >>> but 10% after the first call. Is it something you could improve in >>> the >>> future? Or is it the design, or is it not up to pjproject but to >>> other >>> code pjrpoject uses? Is it on a Mac only? >>> >>> -- Best regards, >>> Alexei >> >> I've noticed exactly the same behaviour on Mac, it's a very annoying >> problem. Just having the sound device open seems to consume an >> inordinate >> amount of CPU cycles already. From what I've seen, it actually >> seems to be a >> PortAudio issue. I already went on their mailinglist to discuss the >> issue, >> but I didn't pursue the matter. >> >> Ruud Klaver >> AG Projects > > I've solved this issure for me, but not shure if this is the most > correct way. It's only about adding one line into pjsua_media.c and > setting snd_auto_close_time=0. I've written about it here: > http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2008-November/005341.html > > Alexei Kuznetsov I'm not using PJSUA, so this is not a solution for me. I don't think it is a solution even, this just seems to close the sound device again if it's idle. The problem still persists, because it will still consume those CPU cycles while in a call (on top of the echo cancellation that is). I did some tests with PortAudio directly, see http://techweb.rfa.org/pipermail/portaudio/2008-October/ 008943.html for the relevant thread. The issue wasn't really solved. Ruud Klaver AG Projects