From e3a0372b80c8fa62dd3b6fccdd8bbdd5ba7ca5ed Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 22 Aug 2011 14:37:45 -0400 Subject: [PATCH] Removed SDL_xaudio2.h ... no real need for this to be separate. --- VisualC/SDL/SDL_VS2005.vcproj | 4 --- VisualC/SDL/SDL_VS2008.vcproj | 4 --- VisualC/SDL/SDL_VS2010.vcxproj | 1 - src/audio/xaudio2/SDL_xaudio2.c | 28 +++++++++++++++-- src/audio/xaudio2/SDL_xaudio2.h | 55 --------------------------------- 5 files changed, 26 insertions(+), 66 deletions(-) delete mode 100644 src/audio/xaudio2/SDL_xaudio2.h diff --git a/VisualC/SDL/SDL_VS2005.vcproj b/VisualC/SDL/SDL_VS2005.vcproj index ec7921d2b..e37a3e8c2 100644 --- a/VisualC/SDL/SDL_VS2005.vcproj +++ b/VisualC/SDL/SDL_VS2005.vcproj @@ -851,10 +851,6 @@ RelativePath="..\..\src\audio\xaudio2\SDL_xaudio2.c" > - - diff --git a/VisualC/SDL/SDL_VS2008.vcproj b/VisualC/SDL/SDL_VS2008.vcproj index 49c0d4701..085bffc8c 100644 --- a/VisualC/SDL/SDL_VS2008.vcproj +++ b/VisualC/SDL/SDL_VS2008.vcproj @@ -840,10 +840,6 @@ RelativePath="..\..\src\audio\xaudio2\SDL_xaudio2.c" > - - diff --git a/VisualC/SDL/SDL_VS2010.vcxproj b/VisualC/SDL/SDL_VS2010.vcxproj index 33bba4d54..ad91eb5a5 100644 --- a/VisualC/SDL/SDL_VS2010.vcxproj +++ b/VisualC/SDL/SDL_VS2010.vcxproj @@ -280,7 +280,6 @@ - diff --git a/src/audio/xaudio2/SDL_xaudio2.c b/src/audio/xaudio2/SDL_xaudio2.c index 8fb74cbd9..4db1ac032 100644 --- a/src/audio/xaudio2/SDL_xaudio2.c +++ b/src/audio/xaudio2/SDL_xaudio2.c @@ -24,11 +24,35 @@ #include "../SDL_audio_c.h" #include "SDL_assert.h" -#define INITGUID 1 -#include "SDL_xaudio2.h" +#include "../SDL_sysaudio.h" + +#if SDL_AUDIO_DRIVER_XAUDIO2 +#include /* XAudio2 exists as of the March 2008 DirectX SDK */ +#if (defined(_DXSDK_BUILD_MAJOR) && (_DXSDK_BUILD_MAJOR >= 1284)) +# define SDL_HAVE_XAUDIO2_H 1 +#endif +#endif #ifdef SDL_HAVE_XAUDIO2_H +#define INITGUID 1 +#include + +/* Hidden "this" pointer for the audio functions */ +#define _THIS SDL_AudioDevice *this + +struct SDL_PrivateAudioData +{ + IXAudio2 *ixa2; + IXAudio2SourceVoice *source; + IXAudio2MasteringVoice *mastering; + HANDLE semaphore; + Uint8 *mixbuf; + int mixlen; + Uint8 *nextbuf; +}; + + static __inline__ char * utf16_to_utf8(const WCHAR *S) { diff --git a/src/audio/xaudio2/SDL_xaudio2.h b/src/audio/xaudio2/SDL_xaudio2.h deleted file mode 100644 index 8a55c1a2f..000000000 --- a/src/audio/xaudio2/SDL_xaudio2.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2011 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ -#include "SDL_config.h" - -#ifndef _SDL_xaudio2_h -#define _SDL_xaudio2_h - -#include "../SDL_sysaudio.h" - -#if SDL_AUDIO_DRIVER_XAUDIO2 -#include /* XAudio2 exists as of the March 2008 DirectX SDK */ -#if (defined(_DXSDK_BUILD_MAJOR) && (_DXSDK_BUILD_MAJOR >= 1284)) -# define SDL_HAVE_XAUDIO2_H 1 -#endif -#endif - -#ifdef SDL_HAVE_XAUDIO2_H -#include - -/* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *this - -struct SDL_PrivateAudioData -{ - IXAudio2 *ixa2; - IXAudio2SourceVoice *source; - IXAudio2MasteringVoice *mastering; - HANDLE semaphore; - Uint8 *mixbuf; - int mixlen; - Uint8 *nextbuf; -}; -#endif - -#endif /* _SDL_xaudio2_h */ - -/* vi: set ts=4 sw=4 expandtab: */