[Scummvm-git-logs] scummvm master -> 7fd9a10bd997585e1757c205e91705adadb6b522

athrxx noreply at scummvm.org
Fri Mar 8 14:32:28 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:
7fd9a10bd9 SCUMM: (Loom/Mac) - fix sound player regression


Commit: 7fd9a10bd997585e1757c205e91705adadb6b522
    https://github.com/scummvm/scummvm/commit/7fd9a10bd997585e1757c205e91705adadb6b522
Author: athrxx (athrxx at scummvm.org)
Date: 2024-03-08T15:32:13+01:00

Commit Message:
SCUMM: (Loom/Mac) - fix sound player regression

Changed paths:
    engines/scumm/players/player_mac_loom_monkey.cpp


diff --git a/engines/scumm/players/player_mac_loom_monkey.cpp b/engines/scumm/players/player_mac_loom_monkey.cpp
index 24ddbfaa847..a30e9f6b109 100644
--- a/engines/scumm/players/player_mac_loom_monkey.cpp
+++ b/engines/scumm/players/player_mac_loom_monkey.cpp
@@ -543,7 +543,7 @@ void LoomMonkeyMacSnd::startSound(int id, int jumpToTick) {
 		_curChanConfig = 0;
 
 	_curSound = id;
-	_curSoundSaveVar = _loader->isMusic() && _loader->isLooping() ? _curSound : 0;
+	_curSoundSaveVar = _loader->restartSoundAfterLoad() ? _curSound : 0;
 
 	setupChannels();
 	sendSoundCommands(jumpToTick);
@@ -555,8 +555,8 @@ void LoomMonkeyMacSnd::startSound(int id, int jumpToTick) {
 }
 
 void LoomMonkeyMacSnd::stopSound(int id) {
-	if (id < 0 || id >= _idRangeMax) {
-		warning("LoomMonkeyMacSnd::stopSound(): sound id '%d' out of range (0 - %d)", id, _idRangeMax - 1);
+	if (id < 1 || id >= _idRangeMax) {
+		warning("LoomMonkeyMacSnd::stopSound(): sound id '%d' out of range (1 - %d)", id, _idRangeMax - 1);
 		return;
 	}
 
@@ -577,8 +577,8 @@ int LoomMonkeyMacSnd::getMusicTimer() {
 }
 
 int LoomMonkeyMacSnd::getSoundStatus(int id) const {
-	if (id < 0 || id >= _idRangeMax) {
-		warning("LoomMonkeyMacSnd::getSoundStatus(): sound id '%d' out of range (0 - %d)", id, _idRangeMax - 1);
+	if (id < 1 || id >= _idRangeMax) {
+		warning("LoomMonkeyMacSnd::getSoundStatus(): sound id '%d' out of range (1 - %d)", id, _idRangeMax - 1);
 		return 0;
 	}
 	Common::StackLock lock(_mixer->mutex());




More information about the Scummvm-git-logs mailing list