aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/scumm.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2012-09-20 03:48:48 +0200
committerJohannes Schickel2012-09-20 04:07:18 +0200
commitc3f37fb1870fb946692b6d67e6d32d2958be2b3a (patch)
treef9b4c0b1884515108f0ad007009c78e436febaad /engines/scumm/scumm.cpp
parent6ea51e8c4564004ce995f4a8e1c80fdd76562c8f (diff)
downloadscummvm-rg350-c3f37fb1870fb946692b6d67e6d32d2958be2b3a.tar.gz
scummvm-rg350-c3f37fb1870fb946692b6d67e6d32d2958be2b3a.tar.bz2
scummvm-rg350-c3f37fb1870fb946692b6d67e6d32d2958be2b3a.zip
SCUMM: Always use the Mac sound output for MI2 Mac.
Formerly it wasn't used when the user selected a MIDI output in the options. Thanks to clone2727 for noticing.
Diffstat (limited to 'engines/scumm/scumm.cpp')
-rw-r--r--engines/scumm/scumm.cpp32
1 files changed, 21 insertions, 11 deletions
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 02c2584d46..7b37517ac0 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -1836,21 +1836,31 @@ void ScummEngine::setupMusic(int midi) {
} else if (_game.version >= 3 && _game.heversion <= 62) {
MidiDriver *nativeMidiDriver = 0;
MidiDriver *adlibMidiDriver = 0;
-
- if (_sound->_musicType != MDT_ADLIB && _sound->_musicType != MDT_TOWNS && _sound->_musicType != MDT_PCSPK)
- nativeMidiDriver = MidiDriver::createMidi(dev);
- if (nativeMidiDriver != NULL && _native_mt32)
- nativeMidiDriver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE);
bool multi_midi = ConfMan.getBool("multi_midi") && _sound->_musicType != MDT_NONE && _sound->_musicType != MDT_PCSPK && (midi & MDT_ADLIB);
+ bool useOnlyNative = false;
+
if (_game.platform == Common::kPlatformMacintosh && _game.id == GID_MONKEY2) {
- adlibMidiDriver = new MacM68kDriver(_mixer);
+ // We setup this driver as native MIDI driver to avoid playback
+ // of the Mac music via a selected MIDI device.
+ nativeMidiDriver = new MacM68kDriver(_mixer);
// The Mac driver is never MT-32.
_native_mt32 = false;
- } else if (_sound->_musicType == MDT_ADLIB || _sound->_musicType == MDT_TOWNS || multi_midi) {
- adlibMidiDriver = MidiDriver::createMidi(MidiDriver::detectDevice(_sound->_musicType == MDT_TOWNS ? MDT_TOWNS : MDT_ADLIB));
- adlibMidiDriver->property(MidiDriver::PROP_OLD_ADLIB, (_game.features & GF_SMALL_HEADER) ? 1 : 0);
- } else if (_sound->_musicType == MDT_PCSPK) {
- adlibMidiDriver = new PcSpkDriver(_mixer);
+ // Ignore non-native drivers. This also ignores the multi MIDI setting.
+ useOnlyNative = true;
+ } else if (_sound->_musicType != MDT_ADLIB && _sound->_musicType != MDT_TOWNS && _sound->_musicType != MDT_PCSPK) {
+ nativeMidiDriver = MidiDriver::createMidi(dev);
+ }
+
+ if (nativeMidiDriver != NULL && _native_mt32)
+ nativeMidiDriver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE);
+
+ if (!useOnlyNative) {
+ if (_sound->_musicType == MDT_ADLIB || _sound->_musicType == MDT_TOWNS || multi_midi) {
+ adlibMidiDriver = MidiDriver::createMidi(MidiDriver::detectDevice(_sound->_musicType == MDT_TOWNS ? MDT_TOWNS : MDT_ADLIB));
+ adlibMidiDriver->property(MidiDriver::PROP_OLD_ADLIB, (_game.features & GF_SMALL_HEADER) ? 1 : 0);
+ } else if (_sound->_musicType == MDT_PCSPK) {
+ adlibMidiDriver = new PcSpkDriver(_mixer);
+ }
}
_imuse = IMuse::create(_system, nativeMidiDriver, adlibMidiDriver);