src/audio/mme/SDL_mmeaudio.h
author Sam Lantinga
Tue, 07 Feb 2006 12:15:46 +0000
changeset 1342 d73be99e9420
parent 1341 d02b552e5304
child 1361 19418e4422cb
permissions -rw-r--r--
Fixed it Hayashi Naoyuki's way. :)
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
#ifndef _SDL_lowaudio_h
slouken@654
    26
#define _SDL_lowaudio_h
slouken@654
    27
#include "SDL_sysaudio.h"
slouken@654
    28
slouken@654
    29
/* Hidden "this" pointer for the video functions */
slouken@654
    30
#define _THIS	SDL_AudioDevice *this
slouken@654
    31
#define NUM_BUFFERS 2
slouken@654
    32
slouken@654
    33
struct SharedMem {
slouken@654
    34
    HWAVEOUT sound;
slouken@654
    35
    WAVEHDR wHdr[NUM_BUFFERS];
slouken@654
    36
    PCMWAVEFORMAT wFmt;
slouken@654
    37
};
slouken@654
    38
slouken@654
    39
struct SDL_PrivateAudioData {
slouken@654
    40
    Uint8 *mixbuf;          /* The raw allocated mixing buffer */
slouken@654
    41
    struct SharedMem *shm;
slouken@654
    42
    int next_buffer;
slouken@654
    43
};
slouken@654
    44
slouken@654
    45
#define shm			(this->hidden->shm)
slouken@654
    46
#define mixbuf			(this->hidden->mixbuf)
slouken@654
    47
#define next_buffer		(this->hidden->next_buffer)
slouken@654
    48
/* Old variable names */
slouken@654
    49
#endif /* _SDL_lowaudio_h */