summaryrefslogtreecommitdiffstats
path: root/audio/out/internal.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-10-10 13:18:53 +0200
committerAlessandro Ghedini <alessandro@ghedini.me>2014-10-11 14:03:08 +0200
commit5c1c99b858a62dc306ba79bca8e616ca184db7f1 (patch)
treeb4e504b81e4d840f3dfdbd4d650572fbb75bc8a9 /audio/out/internal.h
parentf66e320d7b08c78e05b8a3a523c85809ee7cc6ae (diff)
downloadmpv-5c1c99b858a62dc306ba79bca8e616ca184db7f1.tar.bz2
mpv-5c1c99b858a62dc306ba79bca8e616ca184db7f1.tar.xz
audio/out/push: fix EOF heuristic
Since the internal AO driver API has no proper way to determine EOF, we need to guess by querying get_delay. But some AOs (e.g. ao_pulse with no-latency-hacks set) may never reach 0, maybe because they naively add the latency to the buffer level. In this case our heuristic can break. Fix by always using the delay to estimate the EOF time. It's not even that important - it's mostly used to avoid blocking draining. So this should be ok. CC: @mpv-player/stable (maybe)
Diffstat (limited to 'audio/out/internal.h')
-rw-r--r--audio/out/internal.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/audio/out/internal.h b/audio/out/internal.h
index a17aa10f02..7ebdf7bb6d 100644
--- a/audio/out/internal.h
+++ b/audio/out/internal.h
@@ -25,11 +25,6 @@
#include "audio/chmap.h"
#include "audio/chmap_sel.h"
-// If ao_get_delay() reaches this value after ao_play() was called with the
-// AOPLAY_FINAL_CHUNK flag set, the playback core expects that the audio has
-// all been played.
-#define AO_EOF_DELAY 0.05
-
/* global data used by ao.c and ao drivers */
struct ao {
int samplerate;