From 9885952c2a0698e88ec34a2cb9fcef7a6fd69fbb Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 27 May 2020 21:04:32 +0200 Subject: 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. --- audio/out/ao_pulse.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'audio/out/ao_pulse.c') diff --git a/audio/out/ao_pulse.c b/audio/out/ao_pulse.c index fc5fb0caeb..c90ee255c9 100644 --- a/audio/out/ao_pulse.c +++ b/audio/out/ao_pulse.c @@ -278,15 +278,6 @@ static bool select_chmap(struct ao *ao, pa_channel_map *dst) chmap_pa_from_mp(dst, &ao->channels); } -static void drain(struct ao *ao) -{ - struct priv *priv = ao->priv; - if (priv->stream) { - pa_threaded_mainloop_lock(priv->mainloop); - waitop(priv, pa_stream_drain(priv->stream, success_cb, ao)); - } -} - static void uninit(struct ao *ao) { struct priv *priv = ao->priv; @@ -826,7 +817,6 @@ const struct ao_driver audio_out_pulse = { .get_delay = get_delay, .pause = pause, .resume = resume, - .drain = drain, .wait = wait_audio, .wakeup = wakeup, .hotplug_init = hotplug_init, -- cgit v1.2.3