diff --git a/sys/wasapi/gstaudioclient3.h b/sys/wasapi/gstaudioclient3.h index a9f240aa14..784f478d6b 100644 --- a/sys/wasapi/gstaudioclient3.h +++ b/sys/wasapi/gstaudioclient3.h @@ -16,13 +16,14 @@ typedef interface IAudioClient3 IAudioClient3; #ifndef __IAudioClient3_INTERFACE_DEFINED__ #define __IAudioClient3_INTERFACE_DEFINED__ -/* This is only available with IAudioClient3 */ +#ifndef HAVE_AUDCLNT_STREAMOPTIONS typedef enum AUDCLNT_STREAMOPTIONS { AUDCLNT_STREAMOPTIONS_NONE = 0, AUDCLNT_STREAMOPTIONS_RAW = 0x1, AUDCLNT_STREAMOPTIONS_MATCH_FORMAT = 0x2 } AUDCLNT_STREAMOPTIONS; +#endif /* These should be available when the IAudioClient2 interface is defined */ #ifndef __IAudioClient2_FWD_DEFINED__ diff --git a/sys/wasapi/meson.build b/sys/wasapi/meson.build index cf57d8784c..e426743e24 100644 --- a/sys/wasapi/meson.build +++ b/sys/wasapi/meson.build @@ -22,9 +22,14 @@ if not have_audioclient_h and get_option('wasapi').enabled() endif if ole32_dep.found() and ksuser_dep.found() and have_audioclient_h + wasapi_args = ['-DCOBJMACROS'] + if cc.has_header_symbol('audioclient.h', 'AUDCLNT_STREAMOPTIONS_NONE') + wasapi_args += ['-DHAVE_AUDCLNT_STREAMOPTIONS'] + endif + gstwasapi = library('gstwasapi', wasapi_sources, - c_args : gst_plugins_bad_args + ['-DCOBJMACROS'], + c_args : gst_plugins_bad_args + wasapi_args, include_directories : [configinc], dependencies : [gstaudio_dep, ole32_dep, ksuser_dep], install : true,