Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed compiling XAudio2 code with mingw64
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed May 26, 2013
1 parent 2fd3269 commit 54867a7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/audio/xaudio2/SDL_xaudio2.c
Expand Up @@ -28,17 +28,22 @@
#include "../SDL_sysaudio.h"
#include "SDL_assert.h"

#ifdef __GNUC__
/* The configure script already did any necessary checking */
# define SDL_XAUDIO2_HAS_SDK 1
#else
#include <dxsdkver.h> /* XAudio2 exists as of the March 2008 DirectX SDK */
#if (!defined(_DXSDK_BUILD_MAJOR) || (_DXSDK_BUILD_MAJOR < 1284))
# pragma message("Your DirectX SDK is too old. Disabling XAudio2 support.")
#else
# define SDL_XAUDIO2_HAS_SDK 1
#endif
#endif /* __GNUC__ */

#ifdef SDL_XAUDIO2_HAS_SDK

#define INITGUID 1
#include <XAudio2.h>
#include <xaudio2.h>

/* Hidden "this" pointer for the audio functions */
#define _THIS SDL_AudioDevice *this
Expand Down Expand Up @@ -69,7 +74,6 @@ XAUDIO2_DetectDevices(int iscapture, SDL_AddAudioDevice addfn)
IXAudio2 *ixa2 = NULL;
UINT32 devcount = 0;
UINT32 i = 0;
void *ptr = NULL;

if (iscapture) {
SDL_SetError("XAudio2: capture devices unsupported.");
Expand Down

0 comments on commit 54867a7

Please sign in to comment.