summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-04-10 07:57:34 +0200
committerGitHub <noreply@github.com>2018-04-10 07:57:34 +0200
commit2cfc284d52e86dea2ba74d8d8c34261729e07b57 (patch)
treea301e2466004f0d8705f0394c36df401806640ef
parent7e2782e17732d1b690ccd151efaa65a52dc75aeb (diff)
parent3316a64e12cb38d499e39b53d9905ce222a0b82e (diff)
Merge pull request #18047 from marcelofg55/mingw_fix
WASAPI audio driver compile fix on mingw
-rw-r--r--drivers/wasapi/audio_driver_wasapi.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/wasapi/audio_driver_wasapi.cpp b/drivers/wasapi/audio_driver_wasapi.cpp
index 966b69a67e..e1680601ad 100644
--- a/drivers/wasapi/audio_driver_wasapi.cpp
+++ b/drivers/wasapi/audio_driver_wasapi.cpp
@@ -37,6 +37,17 @@
#include <functiondiscoverykeys.h>
+#ifndef PKEY_Device_FriendlyName
+
+#undef DEFINE_PROPERTYKEY
+/* clang-format off */
+#define DEFINE_PROPERTYKEY(id, a, b, c, d, e, f, g, h, i, j, k, l) \
+ const PROPERTYKEY id = { { a, b, c, { d, e, f, g, h, i, j, k, } }, l };
+/* clang-format on */
+
+DEFINE_PROPERTYKEY(PKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 14);
+#endif
+
const CLSID CLSID_MMDeviceEnumerator = __uuidof(MMDeviceEnumerator);
const IID IID_IMMDeviceEnumerator = __uuidof(IMMDeviceEnumerator);
const IID IID_IAudioClient = __uuidof(IAudioClient);