src/audio/mme/SDL_mmeaudio.h
author Sam Lantinga
Mon, 06 Feb 2006 08:28:51 +0000
changeset 1330 450721ad5436
parent 769 b8d311d90021
child 1338 604d73db6802
permissions -rw-r--r--
It's now possible to build SDL without any C runtime at all on Windows,
using Visual C++ 2005
slouken@654
     1
/*
slouken@654
     2
    SDL - Simple DirectMedia Layer
slouken@769
     3
    Copyright (C) 1997-2004 Sam Lantinga
slouken@654
     4
slouken@654
     5
    This library is free software; you can redistribute it and/or
slouken@654
     6
    modify it under the terms of the GNU Library General Public
slouken@654
     7
    License as published by the Free Software Foundation; either
slouken@654
     8
    version 2 of the License, or (at your option) any later version.
slouken@654
     9
slouken@654
    10
    This library is distributed in the hope that it will be useful,
slouken@654
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@654
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@654
    13
    Library General Public License for more details.
slouken@654
    14
slouken@654
    15
    You should have received a copy of the GNU Library General Public
slouken@654
    16
    License along with this library; if not, write to the Free
slouken@654
    17
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
slouken@654
    18
slouken@654
    19
    Sam Lantinga
slouken@654
    20
    slouken@libsdl.org
slouken@654
    21
*/
slouken@654
    22
slouken@654
    23
/* Allow access to a raw mixing buffer */
slouken@654
    24
slouken@654
    25
#include <stdio.h>
slouken@654
    26
#include <stdlib.h>
slouken@654
    27
#include <string.h>
slouken@654
    28
#include <mme_api.h>
slouken@654
    29
slouken@654
    30
#include "SDL_audio.h"
slouken@654
    31
#include "SDL_mutex.h"
slouken@654
    32
#include "SDL_timer.h"
slouken@654
    33
#include "SDL_audio_c.h"
slouken@654
    34
slouken@654
    35
#ifndef _SDL_lowaudio_h
slouken@654
    36
#define _SDL_lowaudio_h
slouken@654
    37
#include "SDL_sysaudio.h"
slouken@654
    38
slouken@654
    39
/* Hidden "this" pointer for the video functions */
slouken@654
    40
#define _THIS	SDL_AudioDevice *this
slouken@654
    41
#define NUM_BUFFERS 2
slouken@654
    42
slouken@654
    43
struct SharedMem {
slouken@654
    44
    HWAVEOUT sound;
slouken@654
    45
    WAVEHDR wHdr[NUM_BUFFERS];
slouken@654
    46
    PCMWAVEFORMAT wFmt;
slouken@654
    47
};
slouken@654
    48
slouken@654
    49
struct SDL_PrivateAudioData {
slouken@654
    50
    Uint8 *mixbuf;          /* The raw allocated mixing buffer */
slouken@654
    51
    struct SharedMem *shm;
slouken@654
    52
    int next_buffer;
slouken@654
    53
};
slouken@654
    54
slouken@654
    55
#define shm			(this->hidden->shm)
slouken@654
    56
#define mixbuf			(this->hidden->mixbuf)
slouken@654
    57
#define next_buffer		(this->hidden->next_buffer)
slouken@654
    58
/* Old variable names */
slouken@654
    59
#endif /* _SDL_lowaudio_h */