Commit 412eb73e authored by Nirbheek Chauhan's avatar Nirbheek Chauhan 🐜

wasapi: Fix build with Windows 8.1 SDK

With the Windows 8.1 SDK, the v1 of the AUDCLNT_STREAMOPTIONS enum is
defined which only has NONE and RAW, so it's not only defined when
AudioClient3 is available.

Add a meson check for the symbol. This is not needed for Autotools
because there we build against the MinGW audioclient.h which is still
at v1 of the AudioClient interface.
parent ee3b48df
......@@ -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__
......
......@@ -10,9 +10,14 @@ if host_system == 'windows' and cc.has_header('audioclient.h')
wasapi_dep = [cc.find_library('ole32'), cc.find_library('ksuser'),
cc.find_library('avrt', required : false)]
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] + wasapi_dep,
install : true,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment