1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-26 17:12:36 +00:00

audio: limit on low (and not high) buffer size

The original intention was probably to avoid unnecessarily high numbers
of wakeups. Change it to wait at most 25% of buffer time instead of 75%
until refilling. Might help with the dsound problems in issue #1024, but
I don't know if success is guaranteed.
This commit is contained in:
wm4 2014-08-21 22:09:48 +02:00
parent f1e78306cb
commit 218ace2b02

View File

@ -281,7 +281,7 @@ static double ao_estimate_timeout(struct ao *ao)
if (timeout > 0.100)
timeout = MPMAX(timeout - 0.200, 0.100);
}
return MPMAX(timeout, ao->device_buffer * 0.75 / ao->samplerate);
return MPMAX(timeout, ao->device_buffer * 0.25 / ao->samplerate);
}
static void *playthread(void *arg)