src/audio/xaudio2/SDL_xaudio2.h
author Ryan C. Gordon <icculus@icculus.org>
Thu, 04 Aug 2011 01:07:09 -0400
changeset 5592 2e88d0742f4d
child 5598 4d05ee9088b1
permissions -rw-r--r--
Implemented XAudio2 target for Windows (and Xbox360, theoretically!).
icculus@5592
     1
/*
icculus@5592
     2
  Simple DirectMedia Layer
icculus@5592
     3
  Copyright (C) 1997-2011 Sam Lantinga <slouken@libsdl.org>
icculus@5592
     4
icculus@5592
     5
  This software is provided 'as-is', without any express or implied
icculus@5592
     6
  warranty.  In no event will the authors be held liable for any damages
icculus@5592
     7
  arising from the use of this software.
icculus@5592
     8
icculus@5592
     9
  Permission is granted to anyone to use this software for any purpose,
icculus@5592
    10
  including commercial applications, and to alter it and redistribute it
icculus@5592
    11
  freely, subject to the following restrictions:
icculus@5592
    12
icculus@5592
    13
  1. The origin of this software must not be misrepresented; you must not
icculus@5592
    14
     claim that you wrote the original software. If you use this software
icculus@5592
    15
     in a product, an acknowledgment in the product documentation would be
icculus@5592
    16
     appreciated but is not required.
icculus@5592
    17
  2. Altered source versions must be plainly marked as such, and must not be
icculus@5592
    18
     misrepresented as being the original software.
icculus@5592
    19
  3. This notice may not be removed or altered from any source distribution.
icculus@5592
    20
*/
icculus@5592
    21
#include "SDL_config.h"
icculus@5592
    22
icculus@5592
    23
#ifndef _SDL_xaudio2_h
icculus@5592
    24
#define _SDL_xaudio2_h
icculus@5592
    25
icculus@5592
    26
#include "../SDL_sysaudio.h"
icculus@5592
    27
icculus@5592
    28
#include <XAudio2.h>
icculus@5592
    29
icculus@5592
    30
/* Hidden "this" pointer for the audio functions */
icculus@5592
    31
#define _THIS	SDL_AudioDevice *this
icculus@5592
    32
icculus@5592
    33
struct SDL_PrivateAudioData
icculus@5592
    34
{
icculus@5592
    35
    IXAudio2 *ixa2;
icculus@5592
    36
    IXAudio2SourceVoice *source;
icculus@5592
    37
    IXAudio2MasteringVoice *mastering;
icculus@5592
    38
    HANDLE semaphore;
icculus@5592
    39
    Uint8 *mixbuf;
icculus@5592
    40
    int mixlen;
icculus@5592
    41
    Uint8 *nextbuf;
icculus@5592
    42
};
icculus@5592
    43
icculus@5592
    44
#endif /* _SDL_xaudio2_h */
icculus@5592
    45
icculus@5592
    46
/* vi: set ts=4 sw=4 expandtab: */