1 #ifndef GAME_SOUND_SOUND_DECODER_H
2 #define GAME_SOUND_SOUND_DECODER_H
37 virtual void open(
const std::string &fname) = 0;
38 virtual void close() = 0;
40 virtual std::string
getName() = 0;
43 virtual size_t read(
char *buffer,
size_t bytes) = 0;
44 virtual void readAll(std::vector<char> &output);
size_t framesToBytes(size_t frames, ChannelConfig config, SampleType type)
Definition: soundmanagerimp.cpp:1159
virtual ~Sound_Decoder()
Definition: sound_decoder.hpp:49
virtual void readAll(std::vector< char > &output)
Definition: soundmanagerimp.cpp:1120
SampleType
Definition: sound_decoder.hpp:14
virtual void open(const std::string &fname)=0
size_t bytesToFrames(size_t bytes, ChannelConfig config, SampleType type)
Definition: soundmanagerimp.cpp:1178
Definition: sound_decoder.hpp:17
Sound_Decoder & operator=(const Sound_Decoder &rhs)
Definition: sound_decoder.hpp:24
virtual void getInfo(int *samplerate, ChannelConfig *chans, SampleType *type)=0
Definition: sound_decoder.hpp:16
Definition: sound_decoder.hpp:22
Definition: sound_decoder.hpp:15
const VFS::Manager * mResourceMgr
Definition: sound_decoder.hpp:35
Definition: sound_decoder.hpp:26
virtual std::string getName()=0
Definition: sound_decoder.hpp:25
Sound_Decoder(const VFS::Manager *resourceMgr)
Definition: sound_decoder.hpp:47
virtual size_t getSampleOffset()=0
const char * getSampleTypeName(SampleType type)
Definition: soundmanagerimp.cpp:1135
The main class responsible for loading files from a virtual file system.
Definition: manager.hpp:20
const char * getChannelConfigName(ChannelConfig config)
Definition: soundmanagerimp.cpp:1146
Definition: sound_decoder.hpp:23
Definition: sound_decoder.hpp:33
virtual size_t read(char *buffer, size_t bytes)=0
ChannelConfig
Definition: sound_decoder.hpp:21