diff options
author | wm4 <wm4@nowhere> | 2020-05-27 21:04:32 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-05-27 21:04:32 +0200 |
commit | 9885952c2a0698e88ec34a2cb9fcef7a6fd69fbb (patch) | |
tree | 070d1543c670e91e37924469db37948c295e7227 /audio/out/ao_openal.c | |
parent | 1b03970d79d06b18d0023a87c33fc546c1f988b5 (diff) | |
download | mpv-9885952c2a0698e88ec34a2cb9fcef7a6fd69fbb.tar.bz2 mpv-9885952c2a0698e88ec34a2cb9fcef7a6fd69fbb.tar.xz |
audio: remove ao_driver.drain
The recent change to the common code removed all calls to ->drain. It's
currently emulated via a timed sleep and polling ao_eof_reached(). That
is actually fallback code for AOs which lacked draining. I could just
readd the drain call, but it was a bad idea anyway. My plan to handle
this better is to require the AO to signal a underrun, even if
AOPLAY_FINAL_CHUNK is not set. Also reinstate not possibly waiting for
ao_lavc.c. ao_pcm.c did not have anything to handle this; whatever.
Diffstat (limited to 'audio/out/ao_openal.c')
-rw-r--r-- | audio/out/ao_openal.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/audio/out/ao_openal.c b/audio/out/ao_openal.c index 53fcaca05e..aa20fb8bed 100644 --- a/audio/out/ao_openal.c +++ b/audio/out/ao_openal.c @@ -274,16 +274,6 @@ err_out: return -1; } -static void drain(struct ao *ao) -{ - ALint state; - alGetSourcei(source, AL_SOURCE_STATE, &state); - while (state == AL_PLAYING) { - mp_sleep_us(10000); - alGetSourcei(source, AL_SOURCE_STATE, &state); - } -} - static void unqueue_buffers(struct ao *ao) { struct priv *q = ao->priv; @@ -420,7 +410,6 @@ const struct ao_driver audio_out_openal = { .pause = audio_pause, .resume = audio_resume, .reset = reset, - .drain = drain, .priv_size = sizeof(struct priv), .priv_defaults = &(const struct priv) { .num_buffers = 4, |