[Scummvm-git-logs] scummvm master -> 31cf2d2fabbf4b2e3df76e39e1482451190da88e

bonki bonki at users.noreply.github.com
Wed Jun 6 20:20:24 CEST 2018


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
788d85d6b8 SCUMM: Work around distorted speech on submarine in Indy4
31cf2d2fab NEWS: Mention fix for #10559 (distorted speech in Indy4)


Commit: 788d85d6b82400e0e6f7e68e4a343129e4d3052a
    https://github.com/scummvm/scummvm/commit/788d85d6b82400e0e6f7e68e4a343129e4d3052a
Author: Adrian Frühwirth (bonki at users.noreply.github.com)
Date: 2018-06-06T18:20:20Z

Commit Message:
SCUMM: Work around distorted speech on submarine in Indy4

The speech sample at VCTL offset 0x76ccbca ("Hey you!") which is used
when Indy gets caught on the German submarine seems to not be a VOC
but raw PCM s16be at (this is a guess) 44.1 kHz with a bogus VOC header.
To work around this we skip the VOC header and decode the raw PCM data.

Fixes Trac#10559

Changed paths:
    engines/scumm/sound.cpp


diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index b9b7e28..b49c694 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -492,6 +492,8 @@ void Sound::startTalkSound(uint32 offset, uint32 b, int mode, Audio::SoundHandle
 #endif
 	Common::ScopedPtr<ScummFile> file;
 
+	bool _sampleIsPCMS16BE44100 = false;
+
 	if (_vm->_game.id == GID_CMI) {
 		_sfxMode |= mode;
 		return;
@@ -584,10 +586,22 @@ void Sound::startTalkSound(uint32 offset, uint32 b, int mode, Audio::SoundHandle
 			size = result->compressed_size;
 #endif
 		} else {
-			offset += 8;
+			// WORKAROUND: Original Indy4 MONSTER.SOU bug
+			// The speech sample at VCTL offset 0x76ccbca ("Hey you!") which is used
+			// when Indy gets caught on the German submarine seems to not be a VOC
+			// but raw PCM s16be at (this is a guess) 44.1 kHz with a bogus VOC header.
+			// To work around this we skip the VOC header and decode the raw PCM data.
+			// Fixes Trac#10559
+			if (mode == 2 && (_vm->_game.id == GID_INDY4) && (_vm->_language == Common::EN_ANY) && offset == 0x76ccbca) {
+				_sampleIsPCMS16BE44100 = true;
+				size = 86016; // size of speech sample
+			} else {
 #if defined(USE_FLAC) || defined(USE_VORBIS) || defined(USE_MAD)
-			size = -1;
+				size = -1;
 #endif
+
+			}
+			offset += 8;
 		}
 
 		file.reset(new ScummFile());
@@ -650,7 +664,12 @@ void Sound::startTalkSound(uint32 offset, uint32 b, int mode, Audio::SoundHandle
 #endif
 			break;
 		default:
-			input = Audio::makeVOCStream(file.release(), Audio::FLAG_UNSIGNED, DisposeAfterUse::YES);
+			if (_sampleIsPCMS16BE44100) {
+				offset += 32; // size of VOC header
+				input = Audio::makeRawStream(new Common::SeekableSubReadStream(file.release(), offset, offset + size, DisposeAfterUse::YES), 44100, Audio::FLAG_16BITS, DisposeAfterUse::YES);
+			} else {
+				input = Audio::makeVOCStream(file.release(), Audio::FLAG_UNSIGNED, DisposeAfterUse::YES);
+			}
 			break;
 		}
 


Commit: 31cf2d2fabbf4b2e3df76e39e1482451190da88e
    https://github.com/scummvm/scummvm/commit/31cf2d2fabbf4b2e3df76e39e1482451190da88e
Author: Adrian Frühwirth (bonki at users.noreply.github.com)
Date: 2018-06-06T18:20:20Z

Commit Message:
NEWS: Mention fix for #10559 (distorted speech in Indy4)

Changed paths:
    NEWS


diff --git a/NEWS b/NEWS
index 1044182..97fbdc2 100644
--- a/NEWS
+++ b/NEWS
@@ -24,6 +24,9 @@ For a more comprehensive changelog of the latest experimental code, see:
    - Implemented lipsync for v6 and v7+ games.
    - Improved Audio quality in Humongous Entertainment games by using the Miles AdLib driver.
    - Fixed possible stack overflows in The Dig and Full Throttle.
+   - Fixed original speech glitch on submarine in Indiana Jones and the Fate of Atlantis.
+     Users need to recompress their monster.sou using an up-to-date version of scummvm-tools
+     for this to take effect when using compressed audio.
 
  Tinsel:
    - Fix loading Discworld 1 savegames from the launcher where Rincewind had a held item





More information about the Scummvm-git-logs mailing list