[MPlayer-dev-eng] PulseAudio drain timeout
Ivan Kalvachev
ikalvachev at gmail.com
Wed Feb 22 22:27:54 CET 2012
On 2/6/12, Reimar Döffinger <Reimar.Doeffinger at gmx.de> wrote:
> On 5 Feb 2012, at 23:10, Ivan Kalvachev <ikalvachev at gmail.com> wrote:
>> On 2/5/12, compn <tempn at twmi.rr.com> wrote:
>>> On Sun, 5 Feb 2012 22:10:37 +0200, Ivan Kalvachev wrote:
>>>> In commit r34652 I've committed a simple workaround for the 2 second
>>>> delay when draining the audio stream in PulseAudio.
>>>>
>>>> While the fix works for the most cases, the person who helped me find
>>>> the solution (Rune Heggtveit) found some cases where it doesn't work.
>>>
>>> why dont we just fork pulseaudio and fix this bug:
>>> http://pulseaudio.org/ticket/440
>>
>> This is the broken_pause I was talking about. It is mentioned in the
>> warning message of the code that detects it inside the init(). However
>> it seems that it is enabled only for 1.9.11 to 1.9.14 and assumes it
>> is fixed in the later versions.
>>
>> Maybe we should allow users to enable it from the command line and
>> config. e.g. -ao pulse:broken_pause:broken_drain
>
> Well, I would have expected that for such a system that all distributions
> have decided to push onto their users someone would make sure it is properly
> tested.
> But yes, if the quality is going to stay around the level of the DMA
> programming of ATI proprietary drivers we should probably allow enabling
> hacks on the command-line just like for them...
It would be nice if somebody who can compile ao_pulse to write the
option support for broken_pause, I do not want to push patches I can't
test on my system (or to install PA from source ):
As Rune Heggtveit haven't appeared with more recent results, here I
once again post his findings that he had shared some (long) time ago
on #mplayer.
His code is still present at http://codepad.org/BUbw15nD if you want
to take a look. (I'll keep a local copy, if somebody wants it).
His findings are:
1. Instead of writing zeroes to the output, one can use
pa_stream_trigger() function.
2. To prevent trigger in the case the stream is no longer playing
pa_stream_get_timing_info() should be used to query for that case.
3. The _info() function returns more information that could be used to
properly guess the time needed to sleep or the time the sink would
take to play the samples.
To me it looks like the highest form of PulseAudio voodoo magic.
More information about the MPlayer-dev-eng
mailing list