diff options
| -rw-r--r-- | engines/sci/sound/midiparser_sci.cpp | 4 | ||||
| -rw-r--r-- | engines/sci/sound/music.cpp | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/engines/sci/sound/midiparser_sci.cpp b/engines/sci/sound/midiparser_sci.cpp index 189d9b8727..bdb907a451 100644 --- a/engines/sci/sound/midiparser_sci.cpp +++ b/engines/sci/sound/midiparser_sci.cpp @@ -545,6 +545,10 @@ byte *MidiParser_SCI::midiFilterChannels(int channelMask) { break; default: // MIDI command + // remember which channel got used for channel remapping + byte midiChannel = command & 0xF; + _channelUsed[midiChannel] = true; + if (lastCommand != command) { *outData++ = command; debugC(4, kDebugLevelSound, "%02X ", command); diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp index 213d3830c7..a1c6cc0a56 100644 --- a/engines/sci/sound/music.cpp +++ b/engines/sci/sound/music.cpp @@ -232,6 +232,9 @@ void SciMusic::soundInitSnd(MusicEntry *pSnd) { // This one checks, if requested channel is available -> in that case give caller that channel // Otherwise look for an unused one int16 SciMusic::tryToOwnChannel(MusicEntry *caller, int16 bestChannel) { + // Don't even try this for SCI0 + if (_soundVersion <= SCI_VERSION_0_LATE) + return bestChannel; if (!_usedChannel[bestChannel]) { // currently unused, so give it to caller directly _usedChannel[bestChannel] = caller; @@ -308,9 +311,9 @@ void SciMusic::soundPlay(MusicEntry *pSnd) { DisposeAfterUse::NO); } } else { - pSnd->pMidiParser->tryToOwnChannels(); _mutex.lock(); if (pSnd->pMidiParser) { + pSnd->pMidiParser->tryToOwnChannels(); pSnd->pMidiParser->setVolume(pSnd->volume); if (pSnd->status == kSoundStopped) pSnd->pMidiParser->jumpToTick(0); |
