aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/players
diff options
context:
space:
mode:
authorJohannes Schickel2014-06-04 01:49:31 +0200
committerJohannes Schickel2014-06-04 01:49:31 +0200
commitecabacaddd0a89b0aa83c9b176891c5c4f47aafc (patch)
treeb26b3f7f0587f57d9ca1588994f5119aaaac0a06 /engines/scumm/players
parent99f97569924664a6f1f996426999ede592bc0723 (diff)
downloadscummvm-rg350-ecabacaddd0a89b0aa83c9b176891c5c4f47aafc.tar.gz
scummvm-rg350-ecabacaddd0a89b0aa83c9b176891c5c4f47aafc.tar.bz2
scummvm-rg350-ecabacaddd0a89b0aa83c9b176891c5c4f47aafc.zip
SCUMM: Properly unlock sound resources when reusing sfx slots in AD code.
Diffstat (limited to 'engines/scumm/players')
-rw-r--r--engines/scumm/players/player_ad.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/scumm/players/player_ad.cpp b/engines/scumm/players/player_ad.cpp
index 7596a3fa7a..fdd62555ff 100644
--- a/engines/scumm/players/player_ad.cpp
+++ b/engines/scumm/players/player_ad.cpp
@@ -121,6 +121,11 @@ void Player_AD::startSound(int sound) {
if (_sfx[channel].resource != -1) {
if (_sfx[channel].priority > priority) {
return;
+ } else {
+ // If we overwrite a channel we will properly stop the old
+ // sfx slot first. This makes sure that the resource is
+ // unlocked properly.
+ stopSfx(&_sfx[channel]);
}
}