summaryrefslogtreecommitdiffstats
path: root/audio/out/ao_wasapi.h
diff options
context:
space:
mode:
authorKevin Mitchell <kevmitch@gmail.com>2015-12-26 12:57:16 -0800
committerKevin Mitchell <kevmitch@gmail.com>2016-01-04 07:41:21 -0800
commit243a2976a8721283e8c6ff1e6cb77230762fe9ab (patch)
treebd5dc2530c6485d67a66f6292e46d3baf1d8196d /audio/out/ao_wasapi.h
parentc725f39baef33c15f10d3fbc4b68569c7115131a (diff)
downloadmpv-243a2976a8721283e8c6ff1e6cb77230762fe9ab.tar.bz2
mpv-243a2976a8721283e8c6ff1e6cb77230762fe9ab.tar.xz
ao_wasapi: rewrite device listing and selection
Unify and clean up listing and selection. Use common enumerator code for both operations to avoid duplication or inconsistencies. Maintain, but significatnly simplify manual device selection by id, name or number. This actually fixes loading by name which didn't really work before since the "name" displayed by --audio-device=help differed from that used to match the selection, which used the device "description" instead. Save the selected deviceID in the private structure for later loading. This will permit moving the device selection into the main thread in a future commit.
Diffstat (limited to 'audio/out/ao_wasapi.h')
-rwxr-xr-xaudio/out/ao_wasapi.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/audio/out/ao_wasapi.h b/audio/out/ao_wasapi.h
index f3ffb4820f..f54e63a783 100755
--- a/audio/out/ao_wasapi.h
+++ b/audio/out/ao_wasapi.h
@@ -63,6 +63,8 @@ typedef struct wasapi_state {
// for setting the audio thread priority
HANDLE hTask;
+ // ID of the device to use
+ LPWSTR deviceID;
// WASAPI object handles owned and used by audio thread
IMMDevice *pDevice;
IAudioClient *pAudioClient;