FIFE
be64c707dea6b3250bd4355bf5c825d25920087d
|
#include <sounddecoder.h>
Public Member Functions | |
virtual | ~SoundDecoder () |
virtual uint64_t | getDecodedLength () const =0 |
Returns the decoded length of the file in bytes. More... | |
bool | needsStreaming () const |
A stream or not? More... | |
virtual bool | setCursor (uint64_t pos)=0 |
Sets the current position in the file (in bytes) More... | |
virtual bool | decode (uint64_t length)=0 |
Request the decoding of the next part of the stream. More... | |
virtual void * | getBuffer () const =0 |
Returns the next decoded buffer. More... | |
virtual uint64_t | getBufferSize ()=0 |
Returns the byte-size of the buffer returned by getBuffer(). More... | |
virtual void | releaseBuffer ()=0 |
Releases the buffer returned by getBuffer() More... | |
bool | isStereo () const |
Tests if the audio data is stereo data or mono. More... | |
ALenum | getALFormat () const |
Returns the openAL-Format of the audio file. More... | |
int16_t | getBitResolution () const |
Returns the bit resolution. More... | |
uint64_t | getSampleRate () const |
Returns the sample rate. More... | |
Protected Attributes | |
bool | m_isstereo |
bool | m_is8bit |
uint64_t | m_samplerate |
Definition at line 41 of file sounddecoder.h.
|
inlinevirtual |
Definition at line 44 of file sounddecoder.h.
References getDecodedLength().
|
pure virtual |
Request the decoding of the next part of the stream.
length | The length of the decoded part |
Implemented in FIFE::SoundDecoderOgg.
Referenced by FIFE::SoundClip::getStream(), FIFE::SoundClip::load(), and needsStreaming().
|
inline |
Returns the openAL-Format of the audio file.
Definition at line 98 of file sounddecoder.h.
References m_is8bit, and m_isstereo.
Referenced by FIFE::SoundClip::getStream(), and FIFE::SoundClip::load().
|
inline |
Returns the bit resolution.
Definition at line 108 of file sounddecoder.h.
References m_is8bit.
Referenced by FIFE::SoundEmitter::getBitResolution(), FIFE::SoundClip::getStreamPos(), and FIFE::SoundClip::setStreamPos().
|
pure virtual |
Returns the next decoded buffer.
The length of the buffer is returned by getBufferSize().
Implemented in FIFE::SoundDecoderOgg.
Referenced by FIFE::SoundClip::getStream(), FIFE::SoundClip::load(), and needsStreaming().
|
pure virtual |
Returns the byte-size of the buffer returned by getBuffer().
Implemented in FIFE::SoundDecoderOgg.
Referenced by FIFE::SoundClip::getStream(), FIFE::SoundClip::load(), and needsStreaming().
|
pure virtual |
Returns the decoded length of the file in bytes.
Implemented in FIFE::SoundDecoderOgg.
Referenced by FIFE::SoundEmitter::getDecodedLength(), FIFE::SoundClip::getStream(), needsStreaming(), FIFE::SoundClip::setStreamPos(), and ~SoundDecoder().
|
inline |
Returns the sample rate.
Definition at line 114 of file sounddecoder.h.
References m_samplerate.
Referenced by FIFE::SoundEmitter::getSampleRate(), FIFE::SoundClip::getStream(), FIFE::SoundClip::getStreamPos(), FIFE::SoundClip::load(), and FIFE::SoundClip::setStreamPos().
|
inline |
Tests if the audio data is stereo data or mono.
Definition at line 92 of file sounddecoder.h.
References m_isstereo.
Referenced by FIFE::SoundClip::getStreamPos(), FIFE::SoundEmitter::isStereo(), and FIFE::SoundClip::setStreamPos().
|
inline |
A stream or not?
The decision if we decode the whole audio file in one buffer or use a kind of streaming depends on the value of MAX_KEEP_IN_MEM from soundconfig.h
Definition at line 59 of file sounddecoder.h.
References decode(), getBuffer(), getBufferSize(), getDecodedLength(), FIFE::MAX_KEEP_IN_MEM, releaseBuffer(), and setCursor().
Referenced by FIFE::SoundClip::load().
|
pure virtual |
Releases the buffer returned by getBuffer()
Implemented in FIFE::SoundDecoderOgg.
Referenced by FIFE::SoundClip::getStream(), FIFE::SoundClip::load(), and needsStreaming().
|
pure virtual |
Sets the current position in the file (in bytes)
Implemented in FIFE::SoundDecoderOgg.
Referenced by FIFE::SoundClip::getStream(), and needsStreaming().
|
protected |
Definition at line 120 of file sounddecoder.h.
Referenced by getALFormat(), getBitResolution(), and FIFE::SoundDecoderOgg::SoundDecoderOgg().
|
protected |
Definition at line 119 of file sounddecoder.h.
Referenced by getALFormat(), isStereo(), FIFE::SoundDecoderOgg::setCursor(), and FIFE::SoundDecoderOgg::SoundDecoderOgg().
|
protected |
Definition at line 121 of file sounddecoder.h.
Referenced by getSampleRate(), and FIFE::SoundDecoderOgg::SoundDecoderOgg().