diff options
author | Johannes Schickel | 2014-06-04 01:49:31 +0200 |
---|---|---|
committer | Johannes Schickel | 2014-06-04 01:49:31 +0200 |
commit | ecabacaddd0a89b0aa83c9b176891c5c4f47aafc (patch) | |
tree | b26b3f7f0587f57d9ca1588994f5119aaaac0a06 /engines/scumm/players | |
parent | 99f97569924664a6f1f996426999ede592bc0723 (diff) | |
download | scummvm-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.cpp | 5 |
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]); } } |