00001 // Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones 00002 // This file is part of the "cAudio Engine" 00003 // For conditions of distribution and use, see copyright notice in cAudio.h 00004 00005 #ifndef CWAVDECODER_H_INCLUDED 00006 #define CWAVDECODER_H_INCLUDED 00007 00008 #include "../include/IAudioDecoder.h" 00009 #include "../include/cAudioDefines.h" 00010 00011 #ifdef CAUDIO_COMPILE_WITH_WAV_DECODER 00012 00013 namespace cAudio 00014 { 00015 class cWavDecoder : public IAudioDecoder 00016 { 00017 public: 00018 00019 cWavDecoder(IDataSource* stream); 00020 ~cWavDecoder(); 00021 00022 virtual AudioFormats getFormat(); 00023 virtual int getFrequency(); 00024 virtual bool isSeekingSupported(); 00025 virtual bool isValid(); 00026 virtual int readAudioData(void* output, int amount); 00027 virtual bool setPosition(int position, bool relative); 00028 virtual bool seek(float seconds,bool relative); 00029 virtual float getTotalTime(); 00030 virtual int getTotalSize(); 00031 virtual int getCompressedSize(); 00032 virtual float getCurrentTime(); 00033 virtual int getCurrentPosition(); 00034 virtual int getCurrentCompressedPosition(); 00035 00036 private: 00037 short Channels; 00038 int SampleRate; 00039 int ByteRate; 00040 short BlockAlign; 00041 short BitsPerSample; 00042 int DataSize; 00043 int DataOffset; 00044 00045 bool Valid; 00046 }; 00047 }; 00048 00049 #endif 00050 00051 #endif 00052
1.6.2