OpenMW
|
00001 #ifndef GAME_SOUND_AUDIERE_DECODER_H 00002 #define GAME_SOUND_AUDIERE_DECODER_H 00003 00004 #include <OgreDataStream.h> 00005 00006 #include "audiere.h" 00007 00008 #include "sound_decoder.hpp" 00009 00010 00011 namespace MWSound 00012 { 00013 class Audiere_Decoder : public Sound_Decoder 00014 { 00015 std::string mSoundFileName; 00016 audiere::FilePtr mSoundFile; 00017 audiere::SampleSourcePtr mSoundSource; 00018 int mSampleRate; 00019 SampleType mSampleType; 00020 ChannelConfig mChannelConfig; 00021 00022 virtual void open(const std::string &fname); 00023 virtual void close(); 00024 00025 virtual std::string getName(); 00026 virtual void getInfo(int *samplerate, ChannelConfig *chans, SampleType *type); 00027 00028 virtual size_t read(char *buffer, size_t bytes); 00029 virtual void rewind(); 00030 virtual size_t getSampleOffset(); 00031 00032 Audiere_Decoder& operator=(const Audiere_Decoder &rhs); 00033 Audiere_Decoder(const Audiere_Decoder &rhs); 00034 00035 Audiere_Decoder(); 00036 public: 00037 virtual ~Audiere_Decoder(); 00038 00039 friend class SoundManager; 00040 }; 00041 #ifndef DEFAULT_DECODER 00042 #define DEFAULT_DECODER (::MWSound::Audiere_Decoder) 00043 #endif 00044 }; 00045 00046 #endif