OpenGTA/util/sound_device.h

35 lines
821 B
C
Raw Normal View History

2015-12-03 00:37:02 +00:00
#ifndef UTIL_SOUND_DEVICE_H
#define UTIL_SOUND_DEVICE_H
#include <SDL_stdinc.h>
namespace Audio {
class SoundDevice {
public:
SoundDevice();
~SoundDevice();
void close();
void open();
void open(int _rate, Uint16 _format, int _channels, int _bufsize);
inline const char* getCardName() { return cardName; }
inline const int getRate() { return rate; }
inline const int getNumChannels() { return channels; }
inline const int getBufferSize() { return bufSize; }
enum Status {
CLOSED = 0,
OPEN,
ERROR,
};
inline Status getStatus() const { return status; }
private:
char cardName[50];
int rate;
int channels;
int bufSize;
Uint16 format;
Status status;
};
}
#endif