Ticket #5356: ite-demo-sound.diff

File ite-demo-sound.diff, 1.0 KB (added by eriktorbjorn, 14 years ago)

Patch against current 1.2.0 branch

  • engines/saga/sndres.cpp

     
    225225        }
    226226
    227227        Common::SeekableReadStream& readS = *file;
     228        bool uncompressedSound = false;
    228229
    229230        if (soundResourceLength >= 8) {
    230231                byte header[8];
     
    242243                        resourceType = kSoundShorten;
    243244                }
    244245
    245                 bool uncompressedSound = false;
    246246                // If patch data exists for sound resource 4 (used in ITE intro), don't treat this sound as compressed
    247247                // Patch data for this resource is in file p2_a.iaf or p2_a.voc
    248248                if (_vm->getGameId() == GID_ITE && resourceId == 4 && context->getResourceData(resourceId)->patchData != NULL)
     
    277277                        buffer.flags &= ~Audio::FLAG_16BITS;
    278278                } else {
    279279                        // Voice files in newer ITE demo versions are OKI ADPCM (VOX) encoded
    280                         if (!scumm_stricmp(context->fileName(), "voicesd.rsc"))
     280                        if (!uncompressedSound && !scumm_stricmp(context->fileName(), "voicesd.rsc"))
    281281                                resourceType = kSoundVOX;
    282282                }
    283283        }