diff options
-rw-r--r-- | engines/sci/console.cpp | 3 | ||||
-rw-r--r-- | engines/sci/sound/midiparser_sci.cpp | 11 |
2 files changed, 4 insertions, 10 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index ebe7edecbe..3737ccd59e 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -859,8 +859,7 @@ bool Console::cmdShowInstruments(int argc, const char **argv) { SciVersion doSoundVersion = _engine->_features->detectDoSoundType(); MidiPlayer *player = MidiPlayer_Midi_create(doSoundVersion); - MidiParser_SCI *parser; // = new MidiParser_SCI(doSoundVersion); - // FIXME: add SciMusic object + MidiParser_SCI *parser = new MidiParser_SCI(doSoundVersion, 0); parser->setMidiDriver(player); Common::List<ResourceId> *resources = _engine->getResMan()->listResources(kResourceTypeSound); diff --git a/engines/sci/sound/midiparser_sci.cpp b/engines/sci/sound/midiparser_sci.cpp index 8bc9b97926..b76c5d0624 100644 --- a/engines/sci/sound/midiparser_sci.cpp +++ b/engines/sci/sound/midiparser_sci.cpp @@ -453,14 +453,6 @@ byte *MidiParser_SCI::midiMixChannels() { // remember which channel got used for channel remapping byte midiChannel = command & 0xF; _channelUsed[midiChannel] = true; -// int16 realChannel = _channelRemap[midiChannel]; -// if (realChannel == -1) { -// // We don't own this channel yet, so ask SciMusic to get it (or a remapped one) -// realChannel = _music->tryToOwnChannel(_pSnd, midiChannel); -// _channelRemap[midiChannel] = realChannel; -// } -// // Map new channel -// command = realChannel | (command & 0xF0); if (command != global_prev) *outData++ = command; // out command @@ -592,6 +584,9 @@ byte *MidiParser_SCI::midiFilterChannels(int channelMask) { // This will get called right before actual playing and will try to own the used channels void MidiParser_SCI::tryToOwnChannels() { + // We don't have SciMusic in case debug command show_instruments is used + if (!_music) + return; for (int curChannel = 0; curChannel < 15; curChannel++) { if (_channelUsed[curChannel]) { if (_channelRemap[curChannel] == -1) { |