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.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'audio/out/ao.h') diff --git a/audio/out/ao.h b/audio/out/ao.h index 152490aacc..e462fcf4d5 100644 --- a/audio/out/ao.h +++ b/audio/out/ao.h @@ -59,7 +59,7 @@ struct ao *ao_init_best(struct mpv_global *global, struct input_ctx *input_ctx, struct encode_lavc_context *encode_lavc_ctx, int samplerate, int format, struct mp_chmap channels); -void ao_uninit(struct ao *ao, bool cut_audio); +void ao_uninit(struct ao *ao); void ao_get_format(struct ao *ao, struct mp_audio *format); const char *ao_get_name(struct ao *ao); const char *ao_get_description(struct ao *ao); @@ -71,5 +71,6 @@ int ao_get_space(struct ao *ao); void ao_reset(struct ao *ao); void ao_pause(struct ao *ao); void ao_resume(struct ao *ao); +void ao_drain(struct ao *ao); #endif /* MPLAYER_AUDIO_OUT_H */ -- cgit v1.2.3