From f29f16663ab5687c8cd84234cb5f26aaa66abb97 Mon Sep 17 00:00:00 2001 From: Jonathan Yong <10walls@gmail.com> Date: Mon, 17 Nov 2014 03:37:51 -0800 Subject: 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 --- audio/out/ao_wasapi.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'audio/out/ao_wasapi.h') 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; -- cgit v1.2.3