diff options
author | Martin Kiewitz | 2010-08-03 21:38:26 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-08-03 21:38:26 +0000 |
commit | 7487b51e873bdb9b919641ab84cfa1225cd465ed (patch) | |
tree | 1cef67f2f6216523360075ba80905177adcdb413 /engines/sci/sound | |
parent | dc08c733db190ea9f1814e49cd4ed5a7525a96b0 (diff) | |
download | scummvm-rg350-7487b51e873bdb9b919641ab84cfa1225cd465ed.tar.gz scummvm-rg350-7487b51e873bdb9b919641ab84cfa1225cd465ed.tar.bz2 scummvm-rg350-7487b51e873bdb9b919641ab84cfa1225cd465ed.zip |
SCI: not error()ing out on no free channels
instead we just ignore such channels. I'm not sure how sierra sci behaved in that case, they ignored channels as well, but maybe they removed them from earlier music
svn-id: r51715
Diffstat (limited to 'engines/sci/sound')
-rw-r--r-- | engines/sci/sound/midiparser_sci.cpp | 3 | ||||
-rw-r--r-- | engines/sci/sound/music.cpp | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/engines/sci/sound/midiparser_sci.cpp b/engines/sci/sound/midiparser_sci.cpp index e58fa5120b..6ec28a8b02 100644 --- a/engines/sci/sound/midiparser_sci.cpp +++ b/engines/sci/sound/midiparser_sci.cpp @@ -425,7 +425,8 @@ void MidiParser_SCI::sendToDriver(uint32 midi) { // Channel remapping int16 realChannel = _channelRemap[midiChannel]; - assert(realChannel != -1); + if (realChannel == -1) + return; midi = (midi & 0xFFFFFFF0) | realChannel; if (_mainThreadCalled) diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp index c3315bd2b5..061f380ebc 100644 --- a/engines/sci/sound/music.cpp +++ b/engines/sci/sound/music.cpp @@ -293,7 +293,10 @@ int16 SciMusic::tryToOwnChannel(MusicEntry *caller, int16 bestChannel) { return channelNr; } } - error("no free channels"); + // nothing found, don't map channel at all + // sierra did this as well, although i'm not sure if we act exactly the same way + // maybe they removed channels from previous playing music + return -1; } void SciMusic::freeChannels(MusicEntry *caller) { |