src/audio/xaudio2/SDL_xaudio2.h
changeset 5635 bef0f093c9da
parent 5634 093e60544778
child 5636 44bfdab5eaf1
equal deleted inserted replaced
5634:093e60544778 5635:bef0f093c9da
     1 /*
       
     2   Simple DirectMedia Layer
       
     3   Copyright (C) 1997-2011 Sam Lantinga <slouken@libsdl.org>
       
     4 
       
     5   This software is provided 'as-is', without any express or implied
       
     6   warranty.  In no event will the authors be held liable for any damages
       
     7   arising from the use of this software.
       
     8 
       
     9   Permission is granted to anyone to use this software for any purpose,
       
    10   including commercial applications, and to alter it and redistribute it
       
    11   freely, subject to the following restrictions:
       
    12 
       
    13   1. The origin of this software must not be misrepresented; you must not
       
    14      claim that you wrote the original software. If you use this software
       
    15      in a product, an acknowledgment in the product documentation would be
       
    16      appreciated but is not required.
       
    17   2. Altered source versions must be plainly marked as such, and must not be
       
    18      misrepresented as being the original software.
       
    19   3. This notice may not be removed or altered from any source distribution.
       
    20 */
       
    21 #include "SDL_config.h"
       
    22 
       
    23 #ifndef _SDL_xaudio2_h
       
    24 #define _SDL_xaudio2_h
       
    25 
       
    26 #include "../SDL_sysaudio.h"
       
    27 
       
    28 #if SDL_AUDIO_DRIVER_XAUDIO2
       
    29 #include <dxsdkver.h> /* XAudio2 exists as of the March 2008 DirectX SDK */
       
    30 #if (defined(_DXSDK_BUILD_MAJOR) && (_DXSDK_BUILD_MAJOR >= 1284))
       
    31 #   define SDL_HAVE_XAUDIO2_H 1
       
    32 #endif
       
    33 #endif
       
    34 
       
    35 #ifdef SDL_HAVE_XAUDIO2_H
       
    36 #include <XAudio2.h>
       
    37 
       
    38 /* Hidden "this" pointer for the audio functions */
       
    39 #define _THIS	SDL_AudioDevice *this
       
    40 
       
    41 struct SDL_PrivateAudioData
       
    42 {
       
    43     IXAudio2 *ixa2;
       
    44     IXAudio2SourceVoice *source;
       
    45     IXAudio2MasteringVoice *mastering;
       
    46     HANDLE semaphore;
       
    47     Uint8 *mixbuf;
       
    48     int mixlen;
       
    49     Uint8 *nextbuf;
       
    50 };
       
    51 #endif
       
    52 
       
    53 #endif /* _SDL_xaudio2_h */
       
    54 
       
    55 /* vi: set ts=4 sw=4 expandtab: */