Mercurial > hg > svcore
comparison data/fileio/OggVorbisFileReader.cpp @ 619:268c5431936d
* Update for oggz 1.1.0 API
author | Chris Cannam |
---|---|
date | Fri, 12 Mar 2010 12:04:39 +0000 |
parents | dfc4dd561bb6 |
children | 3e139b2dfe5e |
comparison
equal
deleted
inserted
replaced
618:b1dc68507e46 | 619:268c5431936d |
---|---|
136 | 136 |
137 m_reader->endSerialised(); | 137 m_reader->endSerialised(); |
138 } | 138 } |
139 | 139 |
140 int | 140 int |
141 OggVorbisFileReader::readPacket(OGGZ *, ogg_packet *packet, long, void *data) | 141 OggVorbisFileReader::readPacket(OGGZ *, oggz_packet *packet, long, void *data) |
142 { | 142 { |
143 OggVorbisFileReader *reader = (OggVorbisFileReader *)data; | 143 OggVorbisFileReader *reader = (OggVorbisFileReader *)data; |
144 FishSound *fs = reader->m_fishSound; | 144 FishSound *fs = reader->m_fishSound; |
145 | 145 |
146 fish_sound_prepare_truncation(fs, packet->granulepos, packet->e_o_s); | 146 fish_sound_prepare_truncation(fs, packet->op.granulepos, packet->op.e_o_s); |
147 fish_sound_decode(fs, packet->packet, packet->bytes); | 147 fish_sound_decode(fs, packet->op.packet, packet->op.bytes); |
148 | 148 |
149 reader->m_bytesRead += packet->bytes; | 149 reader->m_bytesRead += packet->op.bytes; |
150 | 150 |
151 // The number of bytes read by this function is smaller than | 151 // The number of bytes read by this function is smaller than |
152 // the file size because of the packet headers | 152 // the file size because of the packet headers |
153 int p = lrint(double(reader->m_bytesRead) * 114 / | 153 int p = lrint(double(reader->m_bytesRead) * 114 / |
154 double(reader->m_fileSize)); | 154 double(reader->m_fileSize)); |