[MPlayer-dev-eng] [PATCH] reduce latency for ao_pulse

Ivan Kalvachev ikalvachev at gmail.com
Sat Jul 24 00:39:50 CEST 2010


On 7/18/10, Dan Oscarsson <Dan.Oscarsson at tieto.com> wrote:
> On 2010-07-14 at 18:50 +0200 Reimar Döffinger wrote:
>> I repeat: autosync was explicitly designed for broken audio drivers, which
>> is exactly this case. It may not actually implement to detect and work
>> for this case, and I am not sure it is possible to do this reasonably
>> successfully.
>
> Looking at what autosync does and testing a little, it does not fix the
> problem, instead it reduces the visual effect by making the effect of an
> unexpected get_delay value take slowly. Just like a-v sync correction is
> normally done slowly instead of a quickly as possible. Depending of
> screen you have and screen refresh rates, this correction is more or
> less visible.
>
> I did some checking and my request to pulseaudio to lower the latency
> results in an increase of 6-7 % on pulseaudio usage (on my system). So
> it does increase CPU usage, but not very much.

I'm not really familiar with audio handling, so forgive me if my
thoughts are a little naive.

You mentioned that the sink latency is increased after pause. Could it
be that mplayer fails to signal properly to pulse that it have been
pause. As result pulse thinks the application (mplayer) is still
supposed to feed data and calculates it into the lag/delay.

One way to workaround this would be to completely close the pulse
link, in a way very similar to how oss closes device file at pause
(something I never liked).

btw, autosync is short of autonomous synchronization.


More information about the MPlayer-dev-eng mailing list