[pulseaudio-tickets] [PulseAudio] #866: pa_simple_drain() takes much longer (about 2000ms) than expected to complete
PulseAudio
trac-noreply at tango.0pointer.de
Tue Jul 12 01:46:53 PDT 2011
#866: pa_simple_drain() takes much longer (about 2000ms) than expected to
complete
---------------------+------------------------------------------------------
Reporter: th | Owner: lennart
Type: defect | Status: new
Milestone: | Component: daemon
Resolution: | Keywords:
---------------------+------------------------------------------------------
Comment(by th):
Actually, if possible I think the promise for pa_simple_drain() should be
slightly more than "do not truncate the audio if the client exits after it
returns". Consider a command line program that plays a sound, and is used
in a script. Maybe a "new mail has arrived" beep, or maybe something more
advanced like TTS notification of some event.
If it runs from the script in a loop, and the approach of "copy the buffer
to somewhere else" in tanuk's comment is used, the program might start
again before playback had finished with the result that the second sound
is played before the other has finished. So, if possible,
pa_simple_drain() should, in addition to making sure that the data already
buffered will eventually be played, also ensure that any subsequently
queued samples from the same client or from a different client started
after the pa_simple_drain() returns and outputting to the same sink, will
only be played back after the ones queued before the pa_simple_drain()
call.
Not sure how clear the above is, but I hope it makes some sense to whoever
picks up this issue :)
--
Ticket URL: <http://pulseaudio.org/ticket/866#comment:10>
PulseAudio <http://pulseaudio.org/>
The PulseAudio Sound Server
More information about the pulseaudio-bugs
mailing list