Mercurial > hg > svcore
diff data/fileio/OggVorbisFileReader.cpp @ 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 | 7feec7756b41 |
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