Ticket #9002: music.patch
File music.patch, 1.3 KB (added by , 15 years ago) |
---|
-
music.cpp
187 187 188 188 fh->file.seek(pos, SEEK_SET); 189 189 190 SafeSubReadStream *tmp = 0;191 192 190 switch (fh->fileType) { 193 191 case kCLUMode: 194 192 if (Sword2Engine::isPsx()) … … 197 195 return makeCLUStream(&fh->file, enc_len); 198 196 #ifdef USE_MAD 199 197 case kMP3Mode: 200 tmp = new SafeSubReadStream(&fh->file, pos, pos + enc_len, false);198 SafeSubReadStream *tmp = new SafeSubReadStream(&fh->file, pos, pos + enc_len, false); 201 199 return Audio::makeMP3Stream(tmp, true); 202 200 #endif 203 201 #ifdef USE_VORBIS 204 202 case kVorbisMode: 205 tmp = new SafeSubReadStream(&fh->file, pos, pos + enc_len, false);203 SafeSubReadStream *tmp = new SafeSubReadStream(&fh->file, pos, pos + enc_len, false); 206 204 return Audio::makeVorbisStream(tmp, true); 207 205 #endif 208 206 #ifdef USE_FLAC 209 207 case kFlacMode: 210 tmp = new SafeSubReadStream(&fh->file, pos, pos + enc_len, false);208 SafeSubReadStream *tmp = new SafeSubReadStream(&fh->file, pos, pos + enc_len, false); 211 209 return Audio::makeFlacStream(tmp, true); 212 210 #endif 213 211 default: … … 295 293 } 296 294 297 295 Audio::AudioStream *makePSXCLUStream(Common::File *file, int size) { 298 296 299 297 // Buffer audio file data, and ask MemoryReadStream to dispose of it 300 298 // when not needed anymore. 301 299