aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2014-10-11 17:31:12 +0200
committerWillem Jan Palenstijn2015-02-15 13:57:11 +0100
commitb80e74af5dec7675a2bf4a3f51da8501518c2be2 (patch)
tree643f2f89721382ec175057b08240a2c980f5c7b8
parente42a5123572cabf435a90eee2f9c01ababbe8528 (diff)
downloadscummvm-rg350-b80e74af5dec7675a2bf4a3f51da8501518c2be2.tar.gz
scummvm-rg350-b80e74af5dec7675a2bf4a3f51da8501518c2be2.tar.bz2
scummvm-rg350-b80e74af5dec7675a2bf4a3f51da8501518c2be2.zip
SCI: Handle voice limits differently
For playBed songs, SCI1early remappers didn't unmap the entire song when there weren't enough voices for a channel. Thanks waltervn.
-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 d58479f18e..f69f40eeca 100644
--- a/engines/sci/sound/music.cpp
+++ b/engines/sci/sound/music.cpp
@@ -1200,8 +1200,12 @@ ChannelRemapping *SciMusic::determineChannelMap() {
int neededVoices = channel._voices;
// do we have enough free voices?
if (map->_freeVoices < neededVoices) {
- // We only care for essential channels
- if (prio > 0) {
+ // We only care for essential channels.
+ // Note: In early SCI1 interpreters, a song started by 'playBed'
+ // would not be skipped even if some channels couldn't be
+ // mapped due to voice limits. So, we treat all channels as
+ // non-essential here for playBed songs.
+ if (prio > 0 || (song->playBed && _soundVersion <= SCI_VERSION_1_EARLY)) {
#ifdef DEBUG_REMAP
debug(" not enough voices; need %d, have %d. Skipping this channel.", neededVoices, map->_freeVoices);
#endif