[Scummvm-git-logs] scummvm master -> 6c6960b593e285b1ef69dda5764258eb15eba23f

bluegr noreply at scummvm.org
Wed May 18 18:54:29 UTC 2022


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:
6c6960b593 SCI: fix bug no. 10183 (QFG1EGA: Baba Yaga's hut sound bug)


Commit: 6c6960b593e285b1ef69dda5764258eb15eba23f
    https://github.com/scummvm/scummvm/commit/6c6960b593e285b1ef69dda5764258eb15eba23f
Author: athrxx (athrxx at scummvm.org)
Date: 2022-05-18T21:54:26+03:00

Commit Message:
SCI: fix bug no. 10183 (QFG1EGA: Baba Yaga's hut sound bug)

Actually its two bugs that both come to surface in that hut... one in SoundCommandParser::processInitSound() and one in SciMusic::soundStop().

Changed paths:
    engines/sci/sound/music.cpp
    engines/sci/sound/soundcmd.cpp


diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp
index 7c79ca56f87..b145aee1283 100644
--- a/engines/sci/sound/music.cpp
+++ b/engines/sci/sound/music.cpp
@@ -699,7 +699,7 @@ void SciMusic::soundStop(MusicEntry *pSnd) {
 	pSnd->fadeStep = 0; // end fading, if fading was in progress
 
 	// SSCI0 resumes the next available sound from the (priority ordered) list with a paused status.
-	if (_soundVersion <= SCI_VERSION_0_LATE && (pSnd = getFirstSlotWithStatus(kSoundPaused)))
+	if (_soundVersion <= SCI_VERSION_0_LATE && previousStatus == kSoundPlaying && (pSnd = getFirstSlotWithStatus(kSoundPaused)))
 		soundResume(pSnd);
 }
 
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index 311ec636bdf..08cb38edf49 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -137,8 +137,12 @@ void SoundCommandParser::processInitSound(reg_t obj) {
 
 	// Check if a track with the same sound object is already playing
 	MusicEntry *oldSound = _music->getSlot(obj);
-	if (oldSound)
-		processDisposeSound(obj);
+	if (oldSound) {
+		if (_soundVersion <= SCI_VERSION_0_LATE)
+			_music->soundKill(oldSound);
+		else
+			processDisposeSound(obj);
+	}
 
 	MusicEntry *newSound = new MusicEntry();
 	newSound->resourceId = resourceId;




More information about the Scummvm-git-logs mailing list