FIFE
be64c707dea6b3250bd4355bf5c825d25920087d
|
#include <sounddecoder_ogg.h>
Public Member Functions | |
SoundDecoderOgg (RawData *ptr) | |
~SoundDecoderOgg () | |
uint64_t | getDecodedLength () const |
Returns the decoded length of the file in bytes. More... | |
bool | setCursor (uint64_t pos) |
Sets the current position in the file (in bytes) More... | |
bool | decode (uint64_t length) |
Request the decoding of the next part of the stream. More... | |
void * | getBuffer () const |
Returns the next decoded buffer. More... | |
uint64_t | getBufferSize () |
Returns the byte-size of the buffer returned by getBuffer(). More... | |
void | releaseBuffer () |
Releases the buffer returned by getBuffer() More... | |
Public Member Functions inherited from FIFE::SoundDecoder | |
virtual | ~SoundDecoder () |
bool | needsStreaming () const |
A stream or not? 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... | |
Private Attributes | |
std::unique_ptr< RawData > | m_file |
uint64_t | m_declength |
uint64_t | m_datasize |
char * | m_data |
OggVorbis_File | m_ovf |
Additional Inherited Members | |
Protected Attributes inherited from FIFE::SoundDecoder | |
bool | m_isstereo |
bool | m_is8bit |
uint64_t | m_samplerate |
Definition at line 41 of file sounddecoder_ogg.h.
FIFE::SoundDecoderOgg::SoundDecoderOgg | ( | RawData * | ptr | ) |
Definition at line 80 of file sounddecoder_ogg.cpp.
References FIFE::OGG_cb::close(), m_data, m_datasize, m_declength, m_file, FIFE::SoundDecoder::m_is8bit, FIFE::SoundDecoder::m_isstereo, m_ovf, FIFE::SoundDecoder::m_samplerate, FIFE::OGG_cb::read(), FIFE::OGG_cb::seek(), and FIFE::OGG_cb::tell().
FIFE::SoundDecoderOgg::~SoundDecoderOgg | ( | ) |
Definition at line 108 of file sounddecoder_ogg.cpp.
References m_ovf, and releaseBuffer().
|
virtual |
Request the decoding of the next part of the stream.
length | The length of the decoded part |
Implements FIFE::SoundDecoder.
Definition at line 113 of file sounddecoder_ogg.cpp.
References m_data, m_datasize, m_ovf, and releaseBuffer().
Referenced by getDecodedLength().
|
inlinevirtual |
Returns the next decoded buffer.
The length of the buffer is returned by getBufferSize().
Implements FIFE::SoundDecoder.
Definition at line 71 of file sounddecoder_ogg.h.
References m_data.
|
inlinevirtual |
Returns the byte-size of the buffer returned by getBuffer().
Implements FIFE::SoundDecoder.
Definition at line 77 of file sounddecoder_ogg.h.
References m_datasize, and releaseBuffer().
|
inlinevirtual |
Returns the decoded length of the file in bytes.
Implements FIFE::SoundDecoder.
Definition at line 50 of file sounddecoder_ogg.h.
References decode(), m_declength, and setCursor().
|
virtual |
Releases the buffer returned by getBuffer()
Implements FIFE::SoundDecoder.
Definition at line 145 of file sounddecoder_ogg.cpp.
References m_data.
Referenced by decode(), getBufferSize(), and ~SoundDecoderOgg().
|
virtual |
Sets the current position in the file (in bytes)
Implements FIFE::SoundDecoder.
Definition at line 138 of file sounddecoder_ogg.cpp.
References FIFE::SoundDecoder::m_isstereo, and m_ovf.
Referenced by getDecodedLength().
|
private |
Definition at line 89 of file sounddecoder_ogg.h.
Referenced by decode(), getBuffer(), releaseBuffer(), and SoundDecoderOgg().
|
private |
Definition at line 88 of file sounddecoder_ogg.h.
Referenced by decode(), getBufferSize(), and SoundDecoderOgg().
|
private |
Definition at line 87 of file sounddecoder_ogg.h.
Referenced by getDecodedLength(), and SoundDecoderOgg().
|
private |
Definition at line 86 of file sounddecoder_ogg.h.
Referenced by SoundDecoderOgg().
|
private |
Definition at line 90 of file sounddecoder_ogg.h.
Referenced by decode(), setCursor(), SoundDecoderOgg(), and ~SoundDecoderOgg().