PJSIP with JACK Audio Connection Kit?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/5/08, Julian Cable <julian.cable at yahoo.com> wrote:
> Hi Benny,
>
>   putting everything in the jack callback is really bad - on my laptop with
> two pjsua instances the laptop locks up completely once the media starts.
> The callback should just read/write pre-prepared audio, and MUST not block
> or busy wait. (I don't know if it does, but the effect is bad).

It shouldn't block to anything like waiting for packets or the like,
but it does block in some mutexes when it needs to access shared
stuffs (like the jitter buffer). Yeah I know most audio APIs tell us
not to do this, but this is just to make their life easier (and make
ours, their user, difficult!).

But if you want, you can tweak the application so that the audio
callbacks don't do anything too complicated. There's a sample code
here: http://trac.pjsip.org/repos/attachment/ticket/438/multiple_snd_devs.c
(see how to add a sound device to the bridge, at line 130). Then you
can set pjsua to use null sound device (pjsua_set_null_snd_dev()), and
the actual sound device will be in port 1.

(btw best to use the latest version from SVN for this to work)

> One other thing. I'm using --null-audio for most of my tests but I had some
> problems because it seems pjsua opens the real audio port first and only
> drops it afterwards. So its hard to get pjsua started if the audio ports are
> in use.
>

I think all pjsip does is just to call Pa_Initialize() and never
attempt to open the device itself, so if this function fails then,
well, it shouldn't.

cheers,
 -benny


> Julian
>
>
>  ________________________________
>  Sent from Yahoo! Mail.
>  The World 's Favourite Email.
>
>
> _______________________________________________
>  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
>
>



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux