Re: Minimum latency achievable aside

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

 



Hi Gianni,

I don't know what minimum latencies you can get with ALSA on PI, you'll just have to experiment. DAWs typically use ASIO format which is designed for low latency operation, I have no idea how hard it would be to implement ASIO or an alternative to ALSA on PI. As you already know most of the pjsua latency is in the audio device buffering. There is also a wsola buffer which holds recorded samples from the microphone awaiting processing by the bridge, this buffer is needed to compensate for differing playback and record sampling rates. And, there is the jitter buffer which is obviously essential to compensate for network delivery timing, missing packets, etc.  There isn't any latency in the media path which isn't essential, more latency allows more variation in the behavior of the audio device or network. You can tweak the parameters to decrease latency at the risk of getting getting poor audio quality when the audio device or network doesn't behave optimally.

I can't see there would be an advantage in using just the pjmedia library instead of pjsua.

Cheers,

Bill

On 5/26/2016 9:44 AM, Gianni Massi wrote:

Hi all,

You’re my hero if you decide to answer even 10% of my question.

 

My question regards latency in applications using the PJSUA library. I am currently running my application on either a machine with Debian or a Raspberry PI board with Raspbian OS using the ALSA audio backend.

 

I was wondering, in your experience is it possible to achieve overall latencies < 50ms with the Pjsua library?

 

I found that the main limit in this is lowering the latency introduced by audio devices, so I was wondering if you could help me understand, if there is a limit, why it so high (in my experience I was not able to go below 42 ms for capture and 42ms for playback, not even by setting the parameter to lower values in the pjsua_media_config object passed during library initialization with pjsua_init()) compared to other applications that use audio devices (e.g. any type of DAWs allows latencies below 20ms).

 

Is there some design requirement to have large buffers at some point in the processing?

Is there anything that can be done by modifying the audio backend?

Can I achieve <50ms latencies by using the pjmedia library directly and not going through pjsua?

Any help will be highly appreciated, Thanks

 

Gianni Massi

 



_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
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