[Scummvm-cvs-logs] scummvm branch-1-8 -> ffd993457d30be1194f113d97d17c0d3ae4cb117

lordhoto lordhoto at gmail.com
Wed Mar 16 15:34:09 CET 2016


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:
ffd993457d SCUMM: Check whether sound effects are active in Player_AD::getSoundStatus.


Commit: ffd993457d30be1194f113d97d17c0d3ae4cb117
    https://github.com/scummvm/scummvm/commit/ffd993457d30be1194f113d97d17c0d3ae4cb117
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2016-03-16T15:33:34+01:00

Commit Message:
SCUMM: Check whether sound effects are active in Player_AD::getSoundStatus.

This fixes bug #7076 "LOOM: AdLib sound effect not stopped at Cygna's grave.".

Original SCUMM (I checked Monkey Island EGA) implemented Sound::isSoundRunning
by checking whether the sound resource of the requested sound id is locked. We
use actual sound state inside the player.

(cherry picked from commit 70ca4218dfdc1a21682b98fd1ef540f965785c0b)

Changed paths:
    NEWS
    engines/scumm/players/player_ad.cpp



diff --git a/NEWS b/NEWS
index 68deac9..26f3e4b 100644
--- a/NEWS
+++ b/NEWS
@@ -34,6 +34,7 @@ For a more comprehensive changelog of the latest experimental code, see:
  SCUMM:
    - Fixed detection of Maniac Mansion from Day of the Tentacle in the Windows
      version of ScummVM.
+   - Fixed a sound effect not stopping in Loom EGA with AdLib.
 
  Broken Sword 2.5:
    - Added option to use English speech instead of German one when no speech is
diff --git a/engines/scumm/players/player_ad.cpp b/engines/scumm/players/player_ad.cpp
index 4d4be2c..ec297aa 100644
--- a/engines/scumm/players/player_ad.cpp
+++ b/engines/scumm/players/player_ad.cpp
@@ -178,7 +178,17 @@ int Player_AD::getMusicTimer() {
 }
 
 int Player_AD::getSoundStatus(int sound) const {
-	return (sound == _soundPlaying);
+	if (sound == _soundPlaying) {
+		return true;
+	}
+
+	for (int i = 0; i < ARRAYSIZE(_sfx); ++i) {
+		if (_sfx[i].resource == sound) {
+			return true;
+		}
+	}
+
+	return false;
 }
 
 void Player_AD::saveLoadWithSerializer(Serializer *ser) {






More information about the Scummvm-git-logs mailing list