diff options
author | Jonathan Yong <10walls@gmail.com> | 2014-11-17 03:37:51 -0800 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2014-11-17 04:30:53 -0800 |
commit | f29f16663ab5687c8cd84234cb5f26aaa66abb97 (patch) | |
tree | e3fa2164e221429beb17106eb3ac3050fb8418a1 /audio/out/ao_wasapi.h | |
parent | 497df443c0a171d7bab193686df93edb189bc54a (diff) | |
download | mpv-f29f16663ab5687c8cd84234cb5f26aaa66abb97.tar.bz2 mpv-f29f16663ab5687c8cd84234cb5f26aaa66abb97.tar.xz |
ao/wasapi: new wasapi device monitoring interface
Implement skeleton IMMNotificationClient to watch for changes in the
sound device. This will make recovery possible from changes shared
mode sample rate, bit depth, "enhancements"/effects and even graceful
device removal.
http://msdn.microsoft.com/en-us/library/windows/desktop/dd371417%28v=vs.85%29.aspx
Signed-off-by: Kevin Mitchell <kevmitch@gmail.com>
Diffstat (limited to 'audio/out/ao_wasapi.h')
-rwxr-xr-x | audio/out/ao_wasapi.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/audio/out/ao_wasapi.h b/audio/out/ao_wasapi.h index 55cf79d8e0..43c81a89d2 100755 --- a/audio/out/ao_wasapi.h +++ b/audio/out/ao_wasapi.h @@ -30,6 +30,14 @@ #include "osdep/atomics.h" +typedef struct change_notify { + IMMNotificationClient client; + LPWSTR monitored; /* Monitored device */ +} change_notify; + +HRESULT wasapi_change_init(struct change_notify *change, IMMDevice *monitor); +void wasapi_change_free(struct change_notify *change); + typedef struct wasapi_state { struct mp_log *log; HANDLE threadLoop; |