[pulseaudio-discuss] long delay after "paplay -s somehost foo.wav"

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Wed Aug 10 14:13:39 PDT 2011


>  > Have you played with the "prebuf" field? It defines the amount of
> buffering
>  > before playback starts. By default it is set to the tlength size,
> that may
>  > explain your 2s wait.
> 
> i don't think so.  the 2s happens at the end of playback, not the
> start.
> the trac ticket i referenced explains it pretty well.  (but to answer
> your
> question, yes, i played with it.)

Quite frankly I am not sure what the problem is, even after reading the bug
description.

In your test file, you have a single stream open. If you write sequentially
multiple tones, they will be played one after the other. There cannot be any
issues with synchronization here, things are serial by construction.
And if you want your program to exit quickly, then you should use
pa_simple_flush, otherwise you will always have to wait for the buffered
data to be played out.

Indeed pa_simple_drain has a delay, but I fail to see how it's a blocking
point.
-Pierre



More information about the pulseaudio-discuss mailing list