diff -Naur configure.in configure.in --- a/configure.in 2016-10-30 02:23:04.000000000 +0100 +++ b/configure.in 2017-05-29 22:20:15.000000000 +0200 @@ -346,7 +346,7 @@ add_objects src/hostapi/wasapi/pa_win_wasapi.o src/common/pa_ringbuffer.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_coinitialize.o src/os/win/pa_win_waveformat.o LIBS="${LIBS} -lwinmm -lm -lole32 -luuid" DLL_LIBS="${DLL_LIBS} -lwinmm -lole32" - CFLAGS="$CFLAGS -I\$(top_srcdir)/src/hostapi/wasapi/mingw-include -UPA_USE_WASAPI -DPA_USE_WASAPI=1" + CFLAGS="$CFLAGS -UPA_USE_WASAPI -DPA_USE_WASAPI=1" fi ;; diff -Naur src/hostapi/dsound/pa_win_ds.c src/hostapi/dsound/pa_win_ds.c --- a/src/hostapi/dsound/pa_win_ds.c 2016-10-30 02:23:04.000000000 +0100 +++ b/src/hostapi/dsound/pa_win_ds.c 2017-05-29 22:20:15.000000000 +0200 @@ -904,7 +904,10 @@ case DSSPEAKER_STEREO: count = 2; break; case DSSPEAKER_SURROUND: count = 4; break; case DSSPEAKER_5POINT1: count = 6; break; - case DSSPEAKER_7POINT1: count = 8; break; +#ifndef DSSPEAKER_7POINT1 +#define DSSPEAKER_7POINT1 0x00000007 +#endif + case DSSPEAKER_7POINT1: count = 8; break; #ifndef DSSPEAKER_7POINT1_SURROUND #define DSSPEAKER_7POINT1_SURROUND 0x00000008 #endif @@ -2136,7 +2139,7 @@ } else { - CalculateBufferSettings( &stream->hostBufferSizeFrames, &pollingPeriodFrames, + CalculateBufferSettings( (unsigned long*)&stream->hostBufferSizeFrames, &pollingPeriodFrames, /* isFullDuplex = */ (inputParameters && outputParameters), suggestedInputLatencyFrames, suggestedOutputLatencyFrames, diff -Naur src/hostapi/wasapi/pa_win_wasapi.c src/hostapi/wasapi/pa_win_wasapi.c --- a/src/hostapi/wasapi/pa_win_wasapi.c 2016-10-30 02:23:04.000000000 +0100 +++ b/src/hostapi/wasapi/pa_win_wasapi.c 2017-05-29 22:20:15.000000000 +0200 @@ -54,16 +54,22 @@ #endif // WASAPI +// using adjustments for MinGW build from @mgeier/MXE +// https://github.com/mxe/mxe/commit/f4bbc45682f021948bdaefd9fd476e2a04c4740f #include // must be before other Wasapi headers -#if defined(_MSC_VER) && (_MSC_VER >= 1400) - #include +#if defined(_MSC_VER) && (_MSC_VER >= 1400) || defined(__MINGW64_VERSION_MAJOR) + #include #define COBJMACROS - #include + #include #include #define INITGUID // Avoid additional linkage of static libs, excessive code will be optimized out by the compiler #include - #include - #include // Used to get IKsJackDescription interface +#ifndef _MSC_VER + #include +#endif + #include + #include + #include // Used to get IKsJackDescription interface #undef INITGUID #endif #ifndef __MWERKS__