aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/players
diff options
context:
space:
mode:
authorJohannes Schickel2016-03-16 15:24:59 +0100
committerJohannes Schickel2016-03-16 15:31:16 +0100
commit70ca4218dfdc1a21682b98fd1ef540f965785c0b (patch)
tree60864dfb67d597e6040dcabed571fd2037225b07 /engines/scumm/players
parent54756498bcef574707a008d4a864060633e15859 (diff)
downloadscummvm-rg350-70ca4218dfdc1a21682b98fd1ef540f965785c0b.tar.gz
scummvm-rg350-70ca4218dfdc1a21682b98fd1ef540f965785c0b.tar.bz2
scummvm-rg350-70ca4218dfdc1a21682b98fd1ef540f965785c0b.zip
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.
Diffstat (limited to 'engines/scumm/players')
-rw-r--r--engines/scumm/players/player_ad.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/engines/scumm/players/player_ad.cpp b/engines/scumm/players/player_ad.cpp
index 4d4be2c3c2..ec297aa40e 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) {