From e16c91d07ab2acfb83fdeaa6dcfcd25c97666504 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 9 Mar 2014 00:49:39 +0100 Subject: audio/out: make draining a separate operation Until now, this was always conflated with uninit. This was ugly, and also many AOs emulated this manually (or just ignored it). Make draining an explicit operation, so AOs which support it can provide it, and for all others generic code will emulate it. For ao_wasapi, we keep it simple and basically disable the internal draining implementation (maybe it should be restored later). Tested on Linux only. --- audio/out/ao_rsound.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'audio/out/ao_rsound.c') diff --git a/audio/out/ao_rsound.c b/audio/out/ao_rsound.c index ef81c621da..75395c5e96 100644 --- a/audio/out/ao_rsound.c +++ b/audio/out/ao_rsound.c @@ -128,15 +128,9 @@ static int init(struct ao *ao) return 0; } -static void uninit(struct ao *ao, bool cut_audio) +static void uninit(struct ao *ao) { struct priv *priv = ao->priv; - /* The API does not provide a direct way to explicitly wait until - * the last byte has been played server-side as this cannot be - * guaranteed by backend drivers, so we approximate this behavior. - */ - if (!cut_audio) - mp_sleep_us(rsd_delay_ms(priv->rd) * 1000); rsd_stop(priv->rd); rsd_free(priv->rd); -- cgit v1.2.3