summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2018-03-09 22:05:49 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2018-03-10 18:54:59 +0530
commita2f5485893bd3343b5a80eaa0f6ceb7b9c7a0ecb (patch)
treef08ca025a97c3de30e9dfd7e2eca147574763c45
parent6e86b322d7c598b6d0262efda03eab288cf9ecc8 (diff)
wasapi: Guard IAudioClient2 structs and enums
These are already defined in the audioclient.h provided by the latest MinGW headers, and the existing #ifndef were obviously wrong. https://bugzilla.gnome.org/show_bug.cgi?id=794197
-rw-r--r--sys/wasapi/gstaudioclient3.h24
1 files changed, 11 insertions, 13 deletions
diff --git a/sys/wasapi/gstaudioclient3.h b/sys/wasapi/gstaudioclient3.h
index e03033b04..a9f240aa1 100644
--- a/sys/wasapi/gstaudioclient3.h
+++ b/sys/wasapi/gstaudioclient3.h
@@ -16,7 +16,16 @@ typedef interface IAudioClient3 IAudioClient3;
#ifndef __IAudioClient3_INTERFACE_DEFINED__
#define __IAudioClient3_INTERFACE_DEFINED__
-#ifndef AUDIO_STREAM_CATEGORY
+/* This is only available with IAudioClient3 */
+typedef enum AUDCLNT_STREAMOPTIONS
+{
+ AUDCLNT_STREAMOPTIONS_NONE = 0,
+ AUDCLNT_STREAMOPTIONS_RAW = 0x1,
+ AUDCLNT_STREAMOPTIONS_MATCH_FORMAT = 0x2
+} AUDCLNT_STREAMOPTIONS;
+
+/* These should be available when the IAudioClient2 interface is defined */
+#ifndef __IAudioClient2_FWD_DEFINED__
typedef enum _AUDIO_STREAM_CATEGORY {
AudioCategory_Other = 0,
AudioCategory_ForegroundOnlyMedia,
@@ -31,18 +40,7 @@ typedef enum _AUDIO_STREAM_CATEGORY {
AudioCategory_Movie,
AudioCategory_Media
} AUDIO_STREAM_CATEGORY;
-#endif
-
-#ifndef AUDCLNT_STREAMOPTIONS
-typedef enum AUDCLNT_STREAMOPTIONS
-{
- AUDCLNT_STREAMOPTIONS_NONE = 0,
- AUDCLNT_STREAMOPTIONS_RAW = 0x1,
- AUDCLNT_STREAMOPTIONS_MATCH_FORMAT = 0x2
-} AUDCLNT_STREAMOPTIONS;
-#endif
-#ifndef AudioClientProperties
typedef struct AudioClientProperties
{
UINT32 cbSize;
@@ -50,7 +48,7 @@ typedef struct AudioClientProperties
AUDIO_STREAM_CATEGORY eCategory;
AUDCLNT_STREAMOPTIONS Options;
} AudioClientProperties;
-#endif
+#endif /* __IAudioClient2_FWD_DEFINED__ */
EXTERN_C const IID IID_IAudioClient3;