aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJohannes Schickel2010-09-14 00:44:41 +0000
committerJohannes Schickel2010-09-14 00:44:41 +0000
commitefc13c42b29b79bc255ea22693aabe3920455566 (patch)
tree82e11a53e8a0749bdf0e78e63dc9e8574a3d114f /engines
parent2a353089aa4863be3d0255fe1a8f65dbabb8c2c1 (diff)
downloadscummvm-rg350-efc13c42b29b79bc255ea22693aabe3920455566.tar.gz
scummvm-rg350-efc13c42b29b79bc255ea22693aabe3920455566.tar.bz2
scummvm-rg350-efc13c42b29b79bc255ea22693aabe3920455566.zip
AGI: Improve support for MT-32 in the MIDI output.
Formerly the AGI MIDI code did not setup the channel mask properly, in case "native_mt32" was set. This resulted in one missing channel (i.e. channel 0), since the MT-32 only responds to data for channels 1-9. svn-id: r52718
Diffstat (limited to 'engines')
-rw-r--r--engines/agi/sound_midi.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/agi/sound_midi.cpp b/engines/agi/sound_midi.cpp
index 840538b92b..413c1ffa37 100644
--- a/engines/agi/sound_midi.cpp
+++ b/engines/agi/sound_midi.cpp
@@ -74,6 +74,9 @@ SoundGenMIDI::SoundGenMIDI(AgiEngine *vm, Audio::Mixer *pMixer) : SoundGen(vm, p
DeviceHandle dev = MidiDriver::detectDevice(MDT_MIDI | MDT_ADLIB);
_driver = MidiDriver::createMidi(dev);
+ if (ConfMan.getBool("native_mt32"))
+ driver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE);
+
memset(_channel, 0, sizeof(_channel));
memset(_channelVolume, 255, sizeof(_channelVolume));
_masterVolume = 0;