 |
CUGL 1.3
Cornell University Game Library
|
37 #ifndef __CU_WAV_DECODER_H__
38 #define __CU_WAV_DECODER_H__
39 #include "CUAudioDecoder.h"
45 #pragma mark WAV Header
69 #pragma mark ADPCM Decoder
87 #pragma mark Constructors
114 #pragma mark Decoding
153 virtual Sint32
read(SDL_RWops* source, Uint8* buffer) = 0;
158 #pragma mark WAV Decoder
219 #pragma mark Constructors
242 bool init(
const char* file)
override {
243 return init(std::string(file));
255 bool init(
const std::string& file)
override;
265 #pragma mark Static Constructors
276 static std::shared_ptr<AudioDecoder>
alloc(
const char* file) {
277 return alloc(std::string(file));
290 static std::shared_ptr<AudioDecoder>
alloc(
const std::string& file);
293 #pragma mark Decoding
314 virtual Sint32
pagein(
float* buffer)
override;
325 void setPage(Uint64 page)
override;
346 bool bootstrap(
const std::string& file);
Type
Definition: CUWAVDecoder.h:185
Uint16 blockalign
Definition: CUWAVDecoder.h:62
Sint64 _datamark
Definition: CUWAVDecoder.h:213
std::shared_ptr< ADPCMDecoder > _adpcm
Definition: CUWAVDecoder.h:216
virtual Sint32 read(SDL_RWops *source, Uint8 *buffer)=0
virtual bool init(WaveFMT *format)
Uint16 bitspersample
Definition: CUWAVDecoder.h:64
Definition: CUAudioDecoder.h:55
Uint32 _sampsize
Definition: CUWAVDecoder.h:211
bool init(const char *file) override
Definition: CUWAVDecoder.h:242
Uint8 * _blkbuffer
Definition: CUWAVDecoder.h:82
Type _datatype
Definition: CUWAVDecoder.h:206
struct cugl::audio::WaveFMT WaveFMT
Uint16 _blocksize
Definition: CUWAVDecoder.h:84
Uint64 getFrames(Uint64 bytes) const
Definition: CUWAVDecoder.h:126
ADPCMDecoder()
Definition: CUWAVDecoder.h:94
Definition: CUWAVDecoder.h:178
Uint8 * _chunker
Definition: CUWAVDecoder.h:204
Uint32 frequency
Definition: CUWAVDecoder.h:58
Uint32 getBlockSize() const
Definition: CUWAVDecoder.h:137
Uint16 channels
Definition: CUWAVDecoder.h:56
virtual Sint32 pagein(float *buffer) override
static std::shared_ptr< AudioDecoder > alloc(const char *file)
Definition: CUWAVDecoder.h:276
Uint16 encoding
Definition: CUWAVDecoder.h:54
WaveFMT _wavefmt
Definition: CUWAVDecoder.h:80
Uint32 _sampbits
Definition: CUWAVDecoder.h:209
void setPage(Uint64 page) override
Uint32 byterate
Definition: CUWAVDecoder.h:60
Definition: CUWAVDecoder.h:77
Type getType() const
Definition: CUWAVDecoder.h:299
SDL_RWops * _source
Definition: CUWAVDecoder.h:202
Definition: CUWAVDecoder.h:52