Mercurial > hg > svcore
changeset 620:3e139b2dfe5e
* Simpler & better fix for oggz 1.1.0 compatibility
author | Chris Cannam |
---|---|
date | Fri, 12 Mar 2010 13:03:53 +0000 |
parents | 268c5431936d |
children | 58c82e10ef00 |
files | data/fileio/OggVorbisFileReader.cpp data/fileio/OggVorbisFileReader.h |
diffstat | 2 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/data/fileio/OggVorbisFileReader.cpp Fri Mar 12 12:04:39 2010 +0000 +++ b/data/fileio/OggVorbisFileReader.cpp Fri Mar 12 13:03:53 2010 +0000 @@ -66,7 +66,7 @@ m_fishSound = fish_sound_new(FISH_SOUND_DECODE, &fsinfo); fish_sound_set_decoded_callback(m_fishSound, acceptFrames, this); - oggz_set_read_callback(m_oggz, -1, readPacket, this); + oggz_set_read_callback(m_oggz, -1, (OggzReadPacket)readPacket, this); if (decodeMode == DecodeAtOnce) { @@ -138,15 +138,15 @@ } int -OggVorbisFileReader::readPacket(OGGZ *, oggz_packet *packet, long, void *data) +OggVorbisFileReader::readPacket(OGGZ *, ogg_packet *packet, long, void *data) { OggVorbisFileReader *reader = (OggVorbisFileReader *)data; FishSound *fs = reader->m_fishSound; - fish_sound_prepare_truncation(fs, packet->op.granulepos, packet->op.e_o_s); - fish_sound_decode(fs, packet->op.packet, packet->op.bytes); + fish_sound_prepare_truncation(fs, packet->granulepos, packet->e_o_s); + fish_sound_decode(fs, packet->packet, packet->bytes); - reader->m_bytesRead += packet->op.bytes; + reader->m_bytesRead += packet->bytes; // The number of bytes read by this function is smaller than // the file size because of the packet headers
--- a/data/fileio/OggVorbisFileReader.h Fri Mar 12 12:04:39 2010 +0000 +++ b/data/fileio/OggVorbisFileReader.h Fri Mar 12 13:03:53 2010 +0000 @@ -82,7 +82,7 @@ bool m_cancelled; int m_completion; - static int readPacket(OGGZ *, oggz_packet *, long, void *); + static int readPacket(OGGZ *, ogg_packet *, long, void *); static int acceptFrames(FishSound *, float **, long, void *); class DecodeThread : public Thread