From 8dca57e4e9fe6e3d5acf03f96c2b4b4469a888a0 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 2 Oct 2010 09:08:05 +0000 Subject: SAGA: Fix bug #3065113 with patched sound glitch Bug #3065113: "ITE demo: patched sound at intro is not played correctly" svn-id: r52975 --- engines/saga/sndres.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/saga') diff --git a/engines/saga/sndres.cpp b/engines/saga/sndres.cpp index a163fdfa2b..9322918db5 100644 --- a/engines/saga/sndres.cpp +++ b/engines/saga/sndres.cpp @@ -225,6 +225,7 @@ bool SndRes::load(ResourceContext *context, uint32 resourceId, SoundBuffer &buff } Common::SeekableReadStream& readS = *file; + bool uncompressedSound = false; if (soundResourceLength >= 8) { byte header[8]; @@ -242,7 +243,6 @@ bool SndRes::load(ResourceContext *context, uint32 resourceId, SoundBuffer &buff resourceType = kSoundShorten; } - bool uncompressedSound = false; // If patch data exists for sound resource 4 (used in ITE intro), don't treat this sound as compressed // Patch data for this resource is in file p2_a.iaf or p2_a.voc if (_vm->getGameId() == GID_ITE && resourceId == 4 && context->getResourceData(resourceId)->patchData != NULL) @@ -277,7 +277,7 @@ bool SndRes::load(ResourceContext *context, uint32 resourceId, SoundBuffer &buff buffer.flags &= ~Audio::FLAG_16BITS; } else { // Voice files in newer ITE demo versions are OKI ADPCM (VOX) encoded - if (!scumm_stricmp(context->fileName(), "voicesd.rsc")) + if (!uncompressedSound && !scumm_stricmp(context->fileName(), "voicesd.rsc")) resourceType = kSoundVOX; } } -- cgit v1.2.3