sdlmixer.h
/* [<][>][^][v][top][bottom][index][help] */
FUNCTIONS
This source file includes following functions.
- sdlmixer
#ifndef _SDLMIXER_H
#define _SDLMIXER_H
#include "mymixer.h"
#include <SDL.h>
#include <SDL_audio.h>
#include "RingBuffer.h"
class sdlmixer : public mymixer {
/* [<][>][^][v][top][bottom][index][help] */
public:
int open(int rate = 44100);
void Mix(short* buf, int samples);
void close();
void Sync();
friend void sdlaudio_callback(void* m, Uint8* stream, int len);
private:
SDL_AudioSpec fmt;
RingBuffer<Uint8> ring;
Uint8* buf;
int bufsize;
};
#endif