aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2014-05-25 12:52:42 +0200
committerWillem Jan Palenstijn2014-05-25 12:52:42 +0200
commitb0f1c28c7913198a1a3685498512c066b57a3b44 (patch)
tree821317588063e7917ddc8140acd1d0532d26a1c3
parent6cf5cb939b8452bb924946529d955469e73a7a0c (diff)
downloadscummvm-rg350-b0f1c28c7913198a1a3685498512c066b57a3b44.tar.gz
scummvm-rg350-b0f1c28c7913198a1a3685498512c066b57a3b44.tar.bz2
scummvm-rg350-b0f1c28c7913198a1a3685498512c066b57a3b44.zip
SCI: Fix voice mapping during midi channel remapping
This fixes the first Patti dream sequence piano song in LSL5 room 320.
-rw-r--r--engines/sci/sound/music.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp
index 97675a140e..606d81357c 100644
--- a/engines/sci/sound/music.cpp
+++ b/engines/sci/sound/music.cpp
@@ -1169,8 +1169,12 @@ ChannelRemapping *SciMusic::determineChannelMap() {
int neededVoices = channel._voices;
// do we have enough free voices?
- // We only care for essential channels
- if (map->_freeVoices < neededVoices && prio > 0) {
+ if (map->_freeVoices < neededVoices) {
+ // We only care for essential channels
+ if (prio > 0) {
+ debug(" not enough voices; need %d, have %d. Skipping this channel.", neededVoices, map->_freeVoices);
+ continue;
+ }
do {
int j = map->lowestPrio();
if (j == -1) {