Hi,
First of all Liquidsoap was not really designed with real-time in
mind. There are buffers around and those cannot be avoided without
changing the implementation deeply. In particular, we do some
buffering when using alsa, because we cannot really fulfill the
realtime requirements otherwise.
That said, I cannot really understand your figure. Here is my
computation. The frame size in Liquidsoap can be changed using
set("frame.duration",0.04). The default value is 0.04 seconds.
input.jack and output.jack both buffer for 2 frames by default (this
can be changed trough the buffer_size parameter of those operators).
So latency should be something like 4 * 0.04 = 0.16 sec, which is much
lower than 0.5. If you want to improve the situation, you can
- lower frame.duration
- use buffer_size=1 in your jack operators
Cheers,
Samuel.
On Mon, Dec 16, 2013 at 6:43 PM, adiblol <[email protected]> wrote:
> How to minimize Liquidsoap's processing latency?
>
> I have written a very simple liquidsoap script to test latency:
>
> --------
> #!/usr/bin/env liquidsoap
>
> set("log.stdout",true)
> set("log.file",false)
>
> stream = input.jack(clock_safe=false)
> output.jack(stream)
> --------
>
> When I connect the ports with music player (mpd) and soundcard, music
> playback starts and stops with about 0.5s latency. I have JACK buffer
> size set to 1024 so the latency should be about 0.02s. When I connect
> mpd directly to soundcard, the latency is unnoticable so it's definitely
> problem with Liquidsoap.
>
> Is there any configuration option I'm missing which causes unwanted
> buffering when set to default value? I tried various clock_safe values
> for input and output but they do nothing.
>
>
> (this is crosspost of
> http://stackoverflow.com/questions/19996901/liquidsoap-jack-latency
> because nobody answered within a month)
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> Savonet-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/savonet-users
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users