diff options
author | wm4 <wm4@nowhere> | 2014-03-09 00:49:39 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-03-09 01:27:41 +0100 |
commit | e16c91d07ab2acfb83fdeaa6dcfcd25c97666504 (patch) | |
tree | 5e5e33af457c4d573a32e15aec95205f4987f9bb /audio/out/internal.h | |
parent | 2f03dc259960c9cb282e8f371d9f68266afea49c (diff) | |
download | mpv-e16c91d07ab2acfb83fdeaa6dcfcd25c97666504.tar.bz2 mpv-e16c91d07ab2acfb83fdeaa6dcfcd25c97666504.tar.xz |
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.
Diffstat (limited to 'audio/out/internal.h')
-rw-r--r-- | audio/out/internal.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/audio/out/internal.h b/audio/out/internal.h index 98de7e08b3..c14cdf3c68 100644 --- a/audio/out/internal.h +++ b/audio/out/internal.h @@ -100,13 +100,14 @@ struct ao_driver { int (*init)(struct ao *ao); // Optional. See ao_control() etc. in ao.c int (*control)(struct ao *ao, enum aocontrol cmd, void *arg); - void (*uninit)(struct ao *ao, bool cut_audio); + void (*uninit)(struct ao *ao); void (*reset)(struct ao*ao); int (*get_space)(struct ao *ao); int (*play)(struct ao *ao, void **data, int samples, int flags); float (*get_delay)(struct ao *ao); void (*pause)(struct ao *ao); void (*resume)(struct ao *ao); + void (*drain)(struct ao *ao); // For option parsing (see vo.h) int priv_size; |