summaryrefslogtreecommitdiffstats
path: root/audio/out/ao_wasapi.h
diff options
context:
space:
mode:
authorKevin Mitchell <kevmitch@gmail.com>2015-03-31 01:56:17 -0700
committerKevin Mitchell <kevmitch@gmail.com>2015-03-31 02:02:54 -0700
commita6bf38bcadafd3f7b08b63d8ea1642a9f351f6e6 (patch)
treee7fb5b2f4d13d452499ac45022444f63c17a336a /audio/out/ao_wasapi.h
parent1091353d476b7187c8cfd350dbb98d2d1ad6d07c (diff)
downloadmpv-a6bf38bcadafd3f7b08b63d8ea1642a9f351f6e6.tar.bz2
mpv-a6bf38bcadafd3f7b08b63d8ea1642a9f351f6e6.tar.xz
ao/wasapi: add ao hotplug
Create a second copy of the change_notify structure for the hotplug ao. change_notify->is_hotplug distinguishes the hotplug version from the regular one monitoring the currently playing ao. Also make the change notification less verbose now that there might be two of them around.
Diffstat (limited to 'audio/out/ao_wasapi.h')
-rwxr-xr-xaudio/out/ao_wasapi.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/audio/out/ao_wasapi.h b/audio/out/ao_wasapi.h
index 2fd266eab0..3ae0816a8d 100755
--- a/audio/out/ao_wasapi.h
+++ b/audio/out/ao_wasapi.h
@@ -20,6 +20,7 @@
#ifndef MP_AO_WASAPI_H_
#define MP_AO_WASAPI_H_
+#include <stdbool.h>
#include <audioclient.h>
#include <audiopolicy.h>
#include <mmdeviceapi.h>
@@ -30,10 +31,11 @@
typedef struct change_notify {
IMMNotificationClient client; /* this must be first in the structure! */
LPWSTR monitored; /* Monitored device */
+ bool is_hotplug;
struct ao *ao;
} change_notify;
-HRESULT wasapi_change_init(struct ao* ao);
+HRESULT wasapi_change_init(struct ao* ao, bool is_hotplug);
void wasapi_change_uninit(struct ao* ao);
#define EXIT_ON_ERROR(hres) \