FIFE  6e1afdbeda11afe9ac53e6023a4be96ef88f1dc6
FIFE::SoundDecoderOgg Class Reference

#include <sounddecoder_ogg.h>

+ Inheritance diagram for FIFE::SoundDecoderOgg:
+ Collaboration diagram for FIFE::SoundDecoderOgg:

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

boost::scoped_ptr< RawDatam_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
 

Detailed Description

Definition at line 41 of file sounddecoder_ogg.h.

Constructor & Destructor Documentation

FIFE::SoundDecoderOgg::~SoundDecoderOgg ( )

Definition at line 108 of file sounddecoder_ogg.cpp.

References m_ovf, and releaseBuffer().

Member Function Documentation

bool FIFE::SoundDecoderOgg::decode ( uint64_t  length)
virtual

Request the decoding of the next part of the stream.

Parameters
lengthThe length of the decoded part
Returns
0 (False), if decoding was successful

Implements FIFE::SoundDecoder.

Definition at line 113 of file sounddecoder_ogg.cpp.

References m_data, m_datasize, m_ovf, and releaseBuffer().

Referenced by getDecodedLength().

+ Here is the caller graph for this function:

void* FIFE::SoundDecoderOgg::getBuffer ( ) const
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.

uint64_t FIFE::SoundDecoderOgg::getBufferSize ( )
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().

uint64_t FIFE::SoundDecoderOgg::getDecodedLength ( ) const
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().

void FIFE::SoundDecoderOgg::releaseBuffer ( )
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().

+ Here is the caller graph for this function:

bool FIFE::SoundDecoderOgg::setCursor ( uint64_t  pos)
virtual

Sets the current position in the file (in bytes)

Returns
True, if the positioning was successful

Implements FIFE::SoundDecoder.

Definition at line 138 of file sounddecoder_ogg.cpp.

References FIFE::SoundDecoder::m_isstereo, and m_ovf.

Referenced by getDecodedLength().

+ Here is the caller graph for this function:

Member Data Documentation

char* FIFE::SoundDecoderOgg::m_data
private

Definition at line 89 of file sounddecoder_ogg.h.

Referenced by decode(), getBuffer(), releaseBuffer(), and SoundDecoderOgg().

uint64_t FIFE::SoundDecoderOgg::m_datasize
private

Definition at line 88 of file sounddecoder_ogg.h.

Referenced by decode(), getBufferSize(), and SoundDecoderOgg().

uint64_t FIFE::SoundDecoderOgg::m_declength
private

Definition at line 87 of file sounddecoder_ogg.h.

Referenced by getDecodedLength(), and SoundDecoderOgg().

boost::scoped_ptr<RawData> FIFE::SoundDecoderOgg::m_file
private

Definition at line 86 of file sounddecoder_ogg.h.

Referenced by SoundDecoderOgg().

OggVorbis_File FIFE::SoundDecoderOgg::m_ovf
private

Definition at line 90 of file sounddecoder_ogg.h.

Referenced by decode(), setCursor(), SoundDecoderOgg(), and ~SoundDecoderOgg().


The documentation for this class was generated from the following files: