[pulseaudio-discuss] trigger and drain after underrun occurs

Baek Chang baeksan at ccrma.stanford.edu
Thu Jun 30 10:28:30 PDT 2011


Hi everyone,

I'm running into some trouble with buffer attributes in gstreamer pulsesink
and pulseaudio.
It seems that if prebuf is non-zero, then I can get much better cpu usage
from pulseaudio and gstreamer.  One problem I am seeing is on EOS when the
file being played is finished.
I always seem to get a buffer underrun callback from pulseaudio at the end
of the stream.  The problem is that when prebuf is non-zero, when the
underrun occurs, timer updates from pulseaudio no longer update the time.
This is probably due to underruns causing a wait until prebuf amount is
filled.

So my question is, pa_stream_trigger() should start the stream playback
immediately without waiting for prebuf to be filled, but I am not seeing any
timer updates occurring after i call trigger.
I also call drain when the EOS event occurs, but this doesn't seem to update
timer either.

Also, why is it that I always get a underrun message when the file is done
playing?  Happens with gstreamer, aplay, paplay.

Thanks
Baek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20110630/15b8bdfa/attachment.htm>


More information about the pulseaudio-discuss mailing list