Removed SDL_xaudio2.h ... no real need for this to be separate.
authorRyan C. Gordon
Mon, 22 Aug 2011 14:37:45 -0400
changeset 5635bef0f093c9da
parent 5634 093e60544778
child 5636 44bfdab5eaf1
Removed SDL_xaudio2.h ... no real need for this to be separate.
VisualC/SDL/SDL_VS2005.vcproj
VisualC/SDL/SDL_VS2008.vcproj
VisualC/SDL/SDL_VS2010.vcxproj
src/audio/xaudio2/SDL_xaudio2.c
src/audio/xaudio2/SDL_xaudio2.h
     1.1 --- a/VisualC/SDL/SDL_VS2005.vcproj	Mon Aug 22 14:30:49 2011 -0400
     1.2 +++ b/VisualC/SDL/SDL_VS2005.vcproj	Mon Aug 22 14:37:45 2011 -0400
     1.3 @@ -852,10 +852,6 @@
     1.4  			>
     1.5  		</File>
     1.6  		<File
     1.7 -			RelativePath="..\..\src\audio\xaudio2\SDL_xaudio2.h"
     1.8 -			>
     1.9 -		</File>
    1.10 -		<File
    1.11  			RelativePath="..\..\src\joystick\windows\SDL_dxjoystick.c"
    1.12  			>
    1.13  		</File>
     2.1 --- a/VisualC/SDL/SDL_VS2008.vcproj	Mon Aug 22 14:30:49 2011 -0400
     2.2 +++ b/VisualC/SDL/SDL_VS2008.vcproj	Mon Aug 22 14:37:45 2011 -0400
     2.3 @@ -841,10 +841,6 @@
     2.4  			>
     2.5  		</File>
     2.6  		<File
     2.7 -			RelativePath="..\..\src\audio\xaudio2\SDL_xaudio2.h"
     2.8 -			>
     2.9 -		</File>
    2.10 -		<File
    2.11  			RelativePath="..\..\src\joystick\windows\SDL_dxjoystick.c"
    2.12  			>
    2.13  		</File>
     3.1 --- a/VisualC/SDL/SDL_VS2010.vcxproj	Mon Aug 22 14:30:49 2011 -0400
     3.2 +++ b/VisualC/SDL/SDL_VS2010.vcxproj	Mon Aug 22 14:37:45 2011 -0400
     3.3 @@ -280,7 +280,6 @@
     3.4      <ClInclude Include="..\..\src\audio\disk\SDL_diskaudio.h" />
     3.5      <ClInclude Include="..\..\src\audio\dummy\SDL_dummyaudio.h" />
     3.6      <ClInclude Include="..\..\src\audio\directsound\SDL_directsound.h" />
     3.7 -    <ClInclude Include="..\..\src\audio\xaudio2\SDL_xaudio2.h" />
     3.8      <ClInclude Include="..\..\src\SDL_error_c.h" />
     3.9      <ClInclude Include="..\..\src\SDL_hints_c.h" />
    3.10      <ClInclude Include="..\..\src\events\SDL_events_c.h" />
     4.1 --- a/src/audio/xaudio2/SDL_xaudio2.c	Mon Aug 22 14:30:49 2011 -0400
     4.2 +++ b/src/audio/xaudio2/SDL_xaudio2.c	Mon Aug 22 14:37:45 2011 -0400
     4.3 @@ -24,11 +24,35 @@
     4.4  #include "../SDL_audio_c.h"
     4.5  #include "SDL_assert.h"
     4.6  
     4.7 -#define INITGUID 1
     4.8 -#include "SDL_xaudio2.h"
     4.9 +#include "../SDL_sysaudio.h"
    4.10 +
    4.11 +#if SDL_AUDIO_DRIVER_XAUDIO2
    4.12 +#include <dxsdkver.h> /* XAudio2 exists as of the March 2008 DirectX SDK */
    4.13 +#if (defined(_DXSDK_BUILD_MAJOR) && (_DXSDK_BUILD_MAJOR >= 1284))
    4.14 +#   define SDL_HAVE_XAUDIO2_H 1
    4.15 +#endif
    4.16 +#endif
    4.17  
    4.18  #ifdef SDL_HAVE_XAUDIO2_H
    4.19  
    4.20 +#define INITGUID 1
    4.21 +#include <XAudio2.h>
    4.22 +
    4.23 +/* Hidden "this" pointer for the audio functions */
    4.24 +#define _THIS	SDL_AudioDevice *this
    4.25 +
    4.26 +struct SDL_PrivateAudioData
    4.27 +{
    4.28 +    IXAudio2 *ixa2;
    4.29 +    IXAudio2SourceVoice *source;
    4.30 +    IXAudio2MasteringVoice *mastering;
    4.31 +    HANDLE semaphore;
    4.32 +    Uint8 *mixbuf;
    4.33 +    int mixlen;
    4.34 +    Uint8 *nextbuf;
    4.35 +};
    4.36 +
    4.37 +
    4.38  static __inline__ char *
    4.39  utf16_to_utf8(const WCHAR *S)
    4.40  {
     5.1 --- a/src/audio/xaudio2/SDL_xaudio2.h	Mon Aug 22 14:30:49 2011 -0400
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,55 +0,0 @@
     5.4 -/*
     5.5 -  Simple DirectMedia Layer
     5.6 -  Copyright (C) 1997-2011 Sam Lantinga <slouken@libsdl.org>
     5.7 -
     5.8 -  This software is provided 'as-is', without any express or implied
     5.9 -  warranty.  In no event will the authors be held liable for any damages
    5.10 -  arising from the use of this software.
    5.11 -
    5.12 -  Permission is granted to anyone to use this software for any purpose,
    5.13 -  including commercial applications, and to alter it and redistribute it
    5.14 -  freely, subject to the following restrictions:
    5.15 -
    5.16 -  1. The origin of this software must not be misrepresented; you must not
    5.17 -     claim that you wrote the original software. If you use this software
    5.18 -     in a product, an acknowledgment in the product documentation would be
    5.19 -     appreciated but is not required.
    5.20 -  2. Altered source versions must be plainly marked as such, and must not be
    5.21 -     misrepresented as being the original software.
    5.22 -  3. This notice may not be removed or altered from any source distribution.
    5.23 -*/
    5.24 -#include "SDL_config.h"
    5.25 -
    5.26 -#ifndef _SDL_xaudio2_h
    5.27 -#define _SDL_xaudio2_h
    5.28 -
    5.29 -#include "../SDL_sysaudio.h"
    5.30 -
    5.31 -#if SDL_AUDIO_DRIVER_XAUDIO2
    5.32 -#include <dxsdkver.h> /* XAudio2 exists as of the March 2008 DirectX SDK */
    5.33 -#if (defined(_DXSDK_BUILD_MAJOR) && (_DXSDK_BUILD_MAJOR >= 1284))
    5.34 -#   define SDL_HAVE_XAUDIO2_H 1
    5.35 -#endif
    5.36 -#endif
    5.37 -
    5.38 -#ifdef SDL_HAVE_XAUDIO2_H
    5.39 -#include <XAudio2.h>
    5.40 -
    5.41 -/* Hidden "this" pointer for the audio functions */
    5.42 -#define _THIS	SDL_AudioDevice *this
    5.43 -
    5.44 -struct SDL_PrivateAudioData
    5.45 -{
    5.46 -    IXAudio2 *ixa2;
    5.47 -    IXAudio2SourceVoice *source;
    5.48 -    IXAudio2MasteringVoice *mastering;
    5.49 -    HANDLE semaphore;
    5.50 -    Uint8 *mixbuf;
    5.51 -    int mixlen;
    5.52 -    Uint8 *nextbuf;
    5.53 -};
    5.54 -#endif
    5.55 -
    5.56 -#endif /* _SDL_xaudio2_h */
    5.57 -
    5.58 -/* vi: set ts=4 sw=4 expandtab: */