Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Implemented XAudio2 target for Windows (and Xbox360, theoretically!).
  • Loading branch information
icculus committed Aug 4, 2011
1 parent 7cf57ff commit 524c5033b89aea31a2a1417c60437e6cb85c4e46
@@ -847,6 +847,14 @@
RelativePath="..\..\src\audio\directsound\SDL_directsound.h"
>
</File>
<File
RelativePath="..\..\src\audio\xaudio2\SDL_xaudio2.c"
>
</File>
<File
RelativePath="..\..\src\audio\xaudio2\SDL_xaudio2.h"
>
</File>
<File
RelativePath="..\..\src\joystick\windows\SDL_dxjoystick.c"
>
@@ -836,6 +836,14 @@
RelativePath="..\..\src\audio\directsound\SDL_directsound.h"
>
</File>
<File
RelativePath="..\..\src\audio\xaudio2\SDL_xaudio2.c"
>
</File>
<File
RelativePath="..\..\src\audio\xaudio2\SDL_xaudio2.h"
>
</File>
<File
RelativePath="..\..\src\joystick\windows\SDL_dxjoystick.c"
>
@@ -280,6 +280,7 @@
<ClInclude Include="..\..\src\audio\disk\SDL_diskaudio.h" />
<ClInclude Include="..\..\src\audio\dummy\SDL_dummyaudio.h" />
<ClInclude Include="..\..\src\audio\directsound\SDL_directsound.h" />
<ClInclude Include="..\..\src\audio\xaudio2\SDL_xaudio2.h" />
<ClInclude Include="..\..\src\SDL_error_c.h" />
<ClInclude Include="..\..\src\SDL_hints_c.h" />
<ClInclude Include="..\..\src\events\SDL_events_c.h" />
@@ -381,6 +382,7 @@
<ClCompile Include="..\..\src\audio\disk\SDL_diskaudio.c" />
<ClCompile Include="..\..\src\audio\dummy\SDL_dummyaudio.c" />
<ClCompile Include="..\..\src\audio\directsound\SDL_directsound.c" />
<ClCompile Include="..\..\src\audio\xaudio2\SDL_xaudio2.c" />
<ClCompile Include="..\..\src\joystick\windows\SDL_dxjoystick.c" />
<ClCompile Include="..\..\src\SDL_error.c" />
<ClCompile Include="..\..\src\events\SDL_events.c" />
@@ -1726,6 +1726,7 @@ AC_HELP_STRING([--enable-directx], [use DirectX for Windows audio/video [[defaul
AC_CHECK_HEADER(ddraw.h, have_ddraw=yes)
AC_CHECK_HEADER(dsound.h, have_dsound=yes)
AC_CHECK_HEADER(dinput.h, have_dinput=yes)
AC_CHECK_HEADER(xaudio2.h, have_xaudio2=yes)
fi
}

@@ -2063,6 +2064,10 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
AC_DEFINE(SDL_AUDIO_DRIVER_DSOUND, 1, [ ])
SOURCES="$SOURCES $srcdir/src/audio/directsound/*.c"
fi
if test x$have_xaudio2 = xyes; then
AC_DEFINE(SDL_AUDIO_DRIVER_XAUDIO2, 1, [ ])
SOURCES="$SOURCES $srcdir/src/audio/xaudio2/*.c"
fi
have_audio=yes
fi
# Set up dummy files for the joystick for now
@@ -2150,6 +2155,10 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
AC_DEFINE(SDL_AUDIO_DRIVER_DSOUND, 1, [ ])
SOURCES="$SOURCES $srcdir/src/audio/directsound/*.c"
fi
if test x$have_xaudio2 = xyes; then
AC_DEFINE(SDL_AUDIO_DRIVER_XAUDIO2, 1, [ ])
SOURCES="$SOURCES $srcdir/src/audio/xaudio2/*.c"
fi
have_audio=yes
fi
# Set up files for the joystick library
@@ -184,6 +184,7 @@
#undef SDL_AUDIO_DRIVER_COREAUDIO
#undef SDL_AUDIO_DRIVER_DISK
#undef SDL_AUDIO_DRIVER_DUMMY
#undef SDL_AUDIO_DRIVER_XAUDIO2
#undef SDL_AUDIO_DRIVER_DSOUND
#undef SDL_AUDIO_DRIVER_ESD
#undef SDL_AUDIO_DRIVER_ESD_DYNAMIC
@@ -145,6 +145,7 @@ typedef unsigned int uintptr_t;
/* Enable various audio drivers */
#ifndef _WIN32_WCE
#define SDL_AUDIO_DRIVER_DSOUND 1
#define SDL_AUDIO_DRIVER_XAUDIO2 1
#endif
#define SDL_AUDIO_DRIVER_WINMM 1
#define SDL_AUDIO_DRIVER_DISK 1
@@ -52,6 +52,7 @@ extern AudioBootStrap SUNAUDIO_bootstrap;
extern AudioBootStrap ARTS_bootstrap;
extern AudioBootStrap ESD_bootstrap;
extern AudioBootStrap NAS_bootstrap;
extern AudioBootStrap XAUDIO2_bootstrap;
extern AudioBootStrap DSOUND_bootstrap;
extern AudioBootStrap WINMM_bootstrap;
extern AudioBootStrap PAUDIO_bootstrap;
@@ -97,6 +98,9 @@ static const AudioBootStrap *const bootstrap[] = {
#if SDL_AUDIO_DRIVER_NAS
&NAS_bootstrap,
#endif
#if SDL_AUDIO_DRIVER_XAUDIO2
&XAUDIO2_bootstrap,
#endif
#if SDL_AUDIO_DRIVER_DSOUND
&DSOUND_bootstrap,
#endif

0 comments on commit 524c503

Please sign in to comment.