1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-10 06:39:49 +00:00
OpenMW/apps/openmw/mwsound/sound_decoder.hpp
Chris Robinson caf5d71d44 Make the sound decoder's Open method return void
Errors are thrown, not returned
2012-03-17 03:18:28 -07:00

31 lines
683 B
C++

#ifndef GAME_SOUND_SOUND_DECODER_H
#define GAME_SOUND_SOUND_DECODER_H
namespace MWSound
{
class Sound_Decoder
{
public:
enum SampleType {
UInt8Sample,
Int16Sample
};
enum ChannelConfig {
MonoChannels,
StereoChannels
};
virtual void Open(const std::string &fname) = 0;
virtual void Close() = 0;
virtual void GetInfo(int *samplerate, ChannelConfig *chans, SampleType *type) = 0;
virtual size_t Read(char *buffer, size_t bytes) = 0;
virtual ~Sound_Decoder() { }
friend class OpenAL_Output;
friend class SoundManager;
};
}
#endif