diff options
author | Chris Robinson <[email protected]> | 2018-11-02 00:13:07 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-02 00:13:07 -0700 |
commit | d66664122a9ba1abea41fd088e8661fff40070e3 (patch) | |
tree | ca7cbf77d5d8688172b5864d2a7b27c80e63afb0 /Alc/backends | |
parent | 66df771d96d98acdf7c31d0ca5729b06502ae7d0 (diff) |
Try another fix to declare GUIDs in C++
Diffstat (limited to 'Alc/backends')
-rw-r--r-- | Alc/backends/wasapi.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Alc/backends/wasapi.cpp b/Alc/backends/wasapi.cpp index ddb3ced0..a390911b 100644 --- a/Alc/backends/wasapi.cpp +++ b/Alc/backends/wasapi.cpp @@ -54,10 +54,16 @@ #include "backends/base.h" -extern "C" { -extern const GUID KSDATAFORMAT_SUBTYPE_PCM; -extern const GUID KSDATAFORMAT_SUBTYPE_IEEE_FLOAT; -} // extern "C" +/* Some headers seem to define these as macros for __uuidof, which is annoying + * since some headers don't declare them at all. Hopefully the ifdef is enough + * to tell if they need to be declared. + */ +#ifndef KSDATAFORMAT_SUBTYPE_PCM +DEFINE_GUID(KSDATAFORMAT_SUBTYPE_PCM, 0x00000001, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); +#endif +#ifndef KSDATAFORMAT_SUBTYPE_IEEE_FLOAT +DEFINE_GUID(KSDATAFORMAT_SUBTYPE_IEEE_FLOAT, 0x00000003, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); +#endif DEFINE_DEVPROPKEY(DEVPKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80,0x20, 0x67,0xd1,0x46,0xa8,0x50,0xe0, 14); DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_FormFactor, 0x1da5d803, 0xd492, 0x4edd, 0x8c,0x23, 0xe0,0xc0,0xff,0xee,0x7f,0x0e, 0); |