Ticket #9002: music.patch

File music.patch, 1.3 KB (added by SF/landhar, 13 years ago)

patch for engines/sword2/music.cpp

  • music.cpp

     
    187187
    188188        fh->file.seek(pos, SEEK_SET);
    189189
    190         SafeSubReadStream *tmp = 0;
    191 
    192190        switch (fh->fileType) {
    193191        case kCLUMode:
    194192                if (Sword2Engine::isPsx())
     
    197195                        return makeCLUStream(&fh->file, enc_len);
    198196#ifdef USE_MAD
    199197        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);
    201199                return Audio::makeMP3Stream(tmp, true);
    202200#endif
    203201#ifdef USE_VORBIS
    204202        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);
    206204                return Audio::makeVorbisStream(tmp, true);
    207205#endif
    208206#ifdef USE_FLAC
    209207        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);
    211209                return Audio::makeFlacStream(tmp, true);
    212210#endif
    213211        default:
     
    295293}
    296294
    297295Audio::AudioStream *makePSXCLUStream(Common::File *file, int size) {
    298        
     296
    299297        // Buffer audio file data, and ask MemoryReadStream to dispose of it
    300298        // when not needed anymore.
    301299