18#include <vorbis/vorbisfile.h>
42 for (
size_t i = 0; i < size * count; i++) {
94 static ov_callbacks oggFileCallbacks = {
104 if (ov_open_callbacks(
oggFileData, &
vf, NULL, 0, oggFileCallbacks) < 0) {
109 vorbis_info *vi = ov_info(&
vf, -1);
139 while (read < data->getCapacity()) {
145 #
if defined(__powerpc__) || defined(__powerpc64__)
Audio decoder base class.
OGG/Vorbis audio decoder.
~VorbisDecoder()
Destructor.
virtual void openFile(const string &pathName, const string &fileName)
Open a local file.
static int oggfiledata_close(VorbisDecoder::OGGFileData *oggFileData)
Close OGG file data.
virtual void close()
Closes the audio file.
static int oggfiledata_seek(VorbisDecoder::OGGFileData *oggFileData, ogg_int64_t offset, int whence)
Seek in OGG file data.
OGGFileData * oggFileData
static size_t oggfiledata_read(void *buffer, size_t size, size_t count, VorbisDecoder::OGGFileData *oggFileData)
Read from OGG file data.
VorbisDecoder()
Constructor.
virtual void reset()
Resets this audio decoder, if a stream was open it will be rewinded.
virtual int32_t readFromStream(ByteBuffer *data)
Read raw PCM data from stream.
static long oggfiledata_tell(VorbisDecoder::OGGFileData *oggFileData)
Tell position of OGG file data.
File system singleton class.
virtual int32_t getCapacity()
virtual Buffer * setPosition(int32_t position)
Set position.