aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/sound/midiparser_sci.cpp3
-rw-r--r--engines/sci/sound/music.cpp5
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) {