[Scummvm-git-logs] scummvm master -> 8f6a146446df5a33e0221db0ba5258b61d241284

bluegr noreply at scummvm.org
Sun Nov 29 11:11:27 UTC 2026


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

Summary:
8f6a146446 TINSEL: Fix compressed speech detection on big-endian systems


Commit: 8f6a146446df5a33e0221db0ba5258b61d241284
    https://github.com/scummvm/scummvm/commit/8f6a146446df5a33e0221db0ba5258b61d241284
Author: Renaud Schweingruber (TuKo1982 at users.noreply.github.com)
Date: 2026-11-29T13:11:22+02:00

Commit Message:
TINSEL: Fix compressed speech detection on big-endian systems

The first entry of the sample index holds the format tag (e.g. MP3,
OGG, FLAC, etc.) and is written by compress_tinsel.

It is read as a little-endian value, then compared through TO_BE_32(),
which does nothing on big-endian hosts.

The tag is then never recognised and the speech is then played as raw
PCM, at best white noise. I've tested a fix on my OS3 68k port with
success.

Assisted-by: Claude:claude-opus-5-5

Changed paths:
    engines/tinsel/sound.cpp


diff --git a/engines/tinsel/sound.cpp b/engines/tinsel/sound.cpp
index 19887cca31e..0bf74c870c1 100644
--- a/engines/tinsel/sound.cpp
+++ b/engines/tinsel/sound.cpp
@@ -527,8 +527,9 @@ void SoundManager::openSampleFiles() {
 
 		f.close();
 
-		// Detect format of soundfile by looking at 1st sample-index
-		switch (TO_BE_32(_sampleIndex[0])) {
+		// Detect format of soundfile by looking at 1st sample-index.
+		const uint32 formatTag = TinselV1Saturn ? _sampleIndex[0] : SWAP_BYTES_32(_sampleIndex[0]);
+		switch (formatTag) {
 		case MKTAG('M','P','3',' '):
 			debugC(DEBUG_DETAILED, kTinselDebugSound, "Detected MP3 sound-data");
 			_soundMode = kMP3Mode;




More information about the Scummvm-git-logs mailing list