From b0f1c28c7913198a1a3685498512c066b57a3b44 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Sun, 25 May 2014 12:52:42 +0200 Subject: SCI: Fix voice mapping during midi channel remapping This fixes the first Patti dream sequence piano song in LSL5 room 320. --- engines/sci/sound/music.cpp | 8 ++++++-- 1 file 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) { -- cgit v1.2.3