#include <oggaudiofile.h>
Saving is not supported. External OGGVorbis library is used for decoding OGG files.
Public Member Functions | |
OggAudioFile () | |
virtual | ~OggAudioFile () |
virtual bool | Open (bool write=false) |
virtual void | Close () |
virtual ulong_t | LoadData () |
virtual ulong_t | LoadBlock (ulong_t size, bool looping) |
virtual ulong_t | LoadTimeBlock (double time, bool looping) |
virtual void | Rewind () |
Protected Member Functions | |
bool | CheckOVError (const long &) |
Protected Attributes | |
OggVorbis_File | ogg_file |
Structure used for decoding OGG files. |
OggAudioFile::OggAudioFile | ( | ) |
Constructor.
OggAudioFile::~OggAudioFile | ( | ) | [virtual] |
Destructor. Closes opened file.
bool OggAudioFile::Open | ( | bool | write = false |
) | [virtual] |
void OggAudioFile::Close | ( | ) | [virtual] |
ulong_t OggAudioFile::LoadData | ( | ) | [virtual] |
Loads audio data from opened OGG file.
Custom callback functions are used for accessing the file.
Reimplemented from DataFile.
Loads one block of audio file. Length of this block is set in bytes.
size | Length of audio block in bytes. | |
looping | Whether looping is enabled. |
Implements AudioFile.
ulong_t OggAudioFile::LoadTimeBlock | ( | double | time, | |
bool | looping | |||
) | [virtual] |
Loads one block of audio file. Length of this block is set by time in seconds.
time | Time length of audio block in seconds. | |
looping | Whether looping is enabled. |
Implements AudioFile.
void OggAudioFile::Rewind | ( | ) | [virtual] |
Rewinds current position to the file beginning.
Implements AudioFile.
bool OggAudioFile::CheckOVError | ( | const long & | read_count | ) | [protected] |
Checks and reports error code returned by Vorbis codec.
read_count | Value returned by various OV functions. |
True
if error occures.
OggVorbis_File OggAudioFile::ogg_file [protected] |
Structure used for decoding OGG files.