MinGW and XAudio support

In SDL_config_windows.h the following lines are present:

#ifndef GNUC
#define SDL_AUDIO_DRIVER_XAUDIO2 1
#endif

If I recall correctly, the logic behind that #ifndef is that MinGW
doesn’t include XAudio, so it’s never even considered. However, I
installed MinGW-w64 as a cross compiler, and these files are present
in both /usr/i686-w64-mingw32/lib and /usr/x86_64-w64-mingw32/lib:

libxaudio2_0.a
libxaudio2_1.a
libxaudio2_2.a
libxaudio2_3.a
libxaudio2_4.a
libxaudio2_5.a
libxaudio2_6.a
libxaudio2_7.a
libxaudio.a
libxaudiod2_7.a
libxaudiod.a

That seems to imply XAudio is indeed included. However, XAudio2.h
seems to be completely missing from /usr/i686-w64-mingw32/include and
/usr/x86_64-w64-mingw32/include (which makes the situation odd - is
XAudio there or not after all?).

Anyway, should that #ifndef still be there?

I believe the XAudio2 interface, prior to windows 8, was only available as
a COM interface, so I’m not 100% that there would be headers available, but
I could be wrong. I don’t know if that gives you the information you need,
as I’m not primarily a win32 programmer, but I am currently using XAudio2
in a windows store app project for work so I know a little about it.

I suspect that it’s not an issue of XAudio2 being available as much as SDL
using another similar interface, like DirectSound.

-AlexOn Fri, Mar 1, 2013 at 9:49 AM, Sik the hedgehog <sik.the.hedgehog at gmail.com wrote:

In SDL_config_windows.h the following lines are present:

#ifndef GNUC
#define SDL_AUDIO_DRIVER_XAUDIO2 1
#endif

If I recall correctly, the logic behind that #ifndef is that MinGW
doesn’t include XAudio, so it’s never even considered. However, I
installed MinGW-w64 as a cross compiler, and these files are present
in both /usr/i686-w64-mingw32/lib and /usr/x86_64-w64-mingw32/lib:

libxaudio2_0.a
libxaudio2_1.a
libxaudio2_2.a
libxaudio2_3.a
libxaudio2_4.a
libxaudio2_5.a
libxaudio2_6.a
libxaudio2_7.a
libxaudio.a
libxaudiod2_7.a
libxaudiod.a

That seems to imply XAudio is indeed included. However, XAudio2.h
seems to be completely missing from /usr/i686-w64-mingw32/include and
/usr/x86_64-w64-mingw32/include (which makes the situation odd - is
XAudio there or not after all?).

Anyway, should that #ifndef still be there?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

XAudio2.h is referenced directly by SDL_XAudio2.c :stuck_out_tongue:

My problem is that the #ifndef seems to exclude using XAudio from
MinGW even when XAudio seems to be actually available there (would be
especially true if the user decides to install XAudio on its own).

2013/3/1, Alex Barry <alex.barry at gmail.com>:> I believe the XAudio2 interface, prior to windows 8, was only available as

a COM interface, so I’m not 100% that there would be headers available, but
I could be wrong. I don’t know if that gives you the information you need,
as I’m not primarily a win32 programmer, but I am currently using XAudio2
in a windows store app project for work so I know a little about it.

I suspect that it’s not an issue of XAudio2 being available as much as SDL
using another similar interface, like DirectSound.

-Alex

On Fri, Mar 1, 2013 at 9:49 AM, Sik the hedgehog <@Sik_the_hedgehog wrote:

In SDL_config_windows.h the following lines are present:

#ifndef GNUC
#define SDL_AUDIO_DRIVER_XAUDIO2 1
#endif

If I recall correctly, the logic behind that #ifndef is that MinGW
doesn’t include XAudio, so it’s never even considered. However, I
installed MinGW-w64 as a cross compiler, and these files are present
in both /usr/i686-w64-mingw32/lib and /usr/x86_64-w64-mingw32/lib:

libxaudio2_0.a
libxaudio2_1.a
libxaudio2_2.a
libxaudio2_3.a
libxaudio2_4.a
libxaudio2_5.a
libxaudio2_6.a
libxaudio2_7.a
libxaudio.a
libxaudiod2_7.a
libxaudiod.a

That seems to imply XAudio is indeed included. However, XAudio2.h
seems to be completely missing from /usr/i686-w64-mingw32/include and
/usr/x86_64-w64-mingw32/include (which makes the situation odd - is
XAudio there or not after all?).

Anyway, should that #ifndef still be there?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

That seems to imply XAudio is indeed included. However, XAudio2.h
seems to be completely missing from /usr/i686-w64-mingw32/include and
/usr/x86_64-w64-mingw32/include (which makes the situation odd - is
XAudio there or not after all?).

Are they providing MingW32-compatible libraries, in case you’ve also
installed a DirectX SDK that includes XAudio2 support?

Unless it works out of the box, we can’t remove that #ifdef. I assume if
you use the configure script with MingW, you don’t end up using
SDL_config_windows.h anyhow, right?

–ryan.

If SDL_config_windows.h isn’t supposed to be used with MinGW then why
is it even accounted for in that file? :confused:

2013/3/1, Ryan C. Gordon :>

That seems to imply XAudio is indeed included. However, XAudio2.h
seems to be completely missing from /usr/i686-w64-mingw32/include and
/usr/x86_64-w64-mingw32/include (which makes the situation odd - is
XAudio there or not after all?).

Are they providing MingW32-compatible libraries, in case you’ve also
installed a DirectX SDK that includes XAudio2 support?

Unless it works out of the box, we can’t remove that #ifdef. I assume if
you use the configure script with MingW, you don’t end up using
SDL_config_windows.h anyhow, right?

–ryan.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Because I use it when cross-compiling release versions of SDL that need to
be binary compatible with those built by Visual Studio.On Fri, Mar 1, 2013 at 6:56 PM, Sik the hedgehog <sik.the.hedgehog at gmail.com wrote:

If SDL_config_windows.h isn’t supposed to be used with MinGW then why
is it even accounted for in that file? :confused:

2013/3/1, Ryan C. Gordon :

That seems to imply XAudio is indeed included. However, XAudio2.h
seems to be completely missing from /usr/i686-w64-mingw32/include and
/usr/x86_64-w64-mingw32/include (which makes the situation odd - is
XAudio there or not after all?).

Are they providing MingW32-compatible libraries, in case you’ve also
installed a DirectX SDK that includes XAudio2 support?

Unless it works out of the box, we can’t remove that #ifdef. I assume if
you use the configure script with MingW, you don’t end up using
SDL_config_windows.h anyhow, right?

–ryan.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org