From a2f5485893bd3343b5a80eaa0f6ceb7b9c7a0ecb Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Fri, 9 Mar 2018 22:05:49 +0530 Subject: [PATCH] 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 --- sys/wasapi/gstaudioclient3.h | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/sys/wasapi/gstaudioclient3.h b/sys/wasapi/gstaudioclient3.h index e03033b..a9f240a 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; -- 2.7.4