[Scummvm-git-logs] scummvm master -> cb82016f3b871b1f6cee4979755a68d309cdc9a5

mgerhardy noreply at scummvm.org
Sat Nov 9 18:42:07 UTC 2024


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

Summary:
cb82016f3b TWINE: fixed invalid music offset for some lba1 versions


Commit: cb82016f3b871b1f6cee4979755a68d309cdc9a5
    https://github.com/scummvm/scummvm/commit/cb82016f3b871b1f6cee4979755a68d309cdc9a5
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2024-11-09T19:41:52+01:00

Commit Message:
TWINE: fixed invalid music offset for some lba1 versions

this should fix issue #15410 (https://bugs.scummvm.org/ticket/15410)

we are now checking if track_01.xxx exists and don't apply the track offset in that case

Changed paths:
    engines/twine/audio/music.cpp


diff --git a/engines/twine/audio/music.cpp b/engines/twine/audio/music.cpp
index ac952a40ad4..a420aa654d9 100644
--- a/engines/twine/audio/music.cpp
+++ b/engines/twine/audio/music.cpp
@@ -190,7 +190,16 @@ bool Music::playTrackCDR(int32 track) {
 	}
 
 	AudioCDManager *cdrom = g_system->getAudioCDManager();
-	return cdrom->play(track + 1, 1, 0, 0);
+	int offset = 1;
+	// usually the tracks are starting at track_02.xxx for gog and steam releases.
+	// But some users might have ripped the original cd audio tracks and named them
+	// from track_01.xxx onwards. So we need to check if the first track exists.
+	//
+	// see https://bugs.scummvm.org/ticket/15410 and https://bugs.scummvm.org/ticket/14669
+	if (cdrom->existExtractedCDAudioFiles(1)) {
+		offset = 0;
+	}
+	return cdrom->play(track + offset, 1, 0, 0);
 }
 
 bool Music::initCdrom() {




More information about the Scummvm-git-logs mailing list