aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJohannes Schickel2014-06-22 16:53:51 +0200
committerJohannes Schickel2014-06-22 16:53:51 +0200
commit5797182aa23d38cd024f9ccf5912339ac675569d (patch)
tree3861dbc9b0fb5c17b4a0b0e134181ee88fcb0b2e /engines
parente3aad13cd75e800e6890868c2a625da4cfd774d6 (diff)
downloadscummvm-rg350-5797182aa23d38cd024f9ccf5912339ac675569d.tar.gz
scummvm-rg350-5797182aa23d38cd024f9ccf5912339ac675569d.tar.bz2
scummvm-rg350-5797182aa23d38cd024f9ccf5912339ac675569d.zip
SCUMM: Do not let music reallocate its own channels in AD player.
This makes it conform to the original.
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/players/player_ad.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/scumm/players/player_ad.cpp b/engines/scumm/players/player_ad.cpp
index ba75bdd922..adcda68e10 100644
--- a/engines/scumm/players/player_ad.cpp
+++ b/engines/scumm/players/player_ad.cpp
@@ -316,7 +316,9 @@ int Player_AD::allocateHWChannel(int priority, SfxSlot *owner) {
// We don't allow SFX to reallocate their own channels. Otherwise we
// would call stopSfx in the midst of startSfx and that can lead to
// horrible states...
- if (_hwChannels[i].priority <= minPrio && (!owner || _hwChannels[i].sfxOwner != owner)) {
+ // We also prevent the music from reallocating its own channels like
+ // in the original.
+ if (_hwChannels[i].priority <= minPrio && _hwChannels[i].sfxOwner != owner) {
minPrio = _hwChannels[i].priority;
channel = i;
}