diff options
-rw-r--r-- | backends/midi/adlib.cpp | 2 | ||||
-rw-r--r-- | scumm/imuse.cpp | 8 | ||||
-rw-r--r-- | scumm/imuse.h | 3 | ||||
-rw-r--r-- | scumm/scummvm.cpp | 1 | ||||
-rw-r--r-- | sound/mididrv.h | 2 |
5 files changed, 11 insertions, 5 deletions
diff --git a/backends/midi/adlib.cpp b/backends/midi/adlib.cpp index 59bb789f67..769ad3e0d2 100644 --- a/backends/midi/adlib.cpp +++ b/backends/midi/adlib.cpp @@ -928,7 +928,7 @@ void MidiDriver_ADLIB::send (uint32 b) { uint32 MidiDriver_ADLIB::property (int prop, uint32 param) { switch (prop) { - case PROP_SMALLHEADER: // Indicates older game, use different operator volume algorithm + case PROP_OLD_ADLIB: // Older games used a different operator volume algorithm _game_SmallHeader = (param > 0); return 1; } diff --git a/scumm/imuse.cpp b/scumm/imuse.cpp index 4b57e3e7a1..2d60d04f22 100644 --- a/scumm/imuse.cpp +++ b/scumm/imuse.cpp @@ -286,6 +286,7 @@ class IMuseInternal { friend struct Player; private: + bool _old_adlib_instruments; bool _enable_multi_midi; MidiDriver *_midi_adlib; MidiDriver *_midi_native; @@ -1654,6 +1655,9 @@ uint32 IMuseInternal::property(int prop, uint32 value) { case IMuse::PROP_MULTI_MIDI: _enable_multi_midi = (value > 0); break; + + case IMuse::PROP_OLD_ADLIB_INSTRUMENTS: + _old_adlib_instruments = (value > 0); } return 0; } @@ -1697,6 +1701,8 @@ int IMuseInternal::initialize(OSystem *syst, MidiDriver *native_midi) { void IMuseInternal::initMidiDriver (MidiDriver *midi) { // Open MIDI driver + midi->property (MidiDriver::PROP_OLD_ADLIB, _old_adlib_instruments ? 1 : 0); + int result = midi->open(); if (result) error("IMuse initialization - ", MidiDriver::getErrorName(result)); @@ -3477,7 +3483,5 @@ uint32 IMuse::property(int prop, uint32 value) { in(); uint32 ret = _target->pro // to the client. IMuse *IMuse::create (OSystem *syst, MidiDriver *midi) { IMuseInternal *engine = IMuseInternal::create (syst, midi); - if (midi) - midi->property (MidiDriver::PROP_SMALLHEADER, (g_scumm->_features & GF_SMALL_HEADER) ? 1 : 0); return new IMuse (syst, engine); } diff --git a/scumm/imuse.h b/scumm/imuse.h index 5006d50f33..b14a877e1f 100644 --- a/scumm/imuse.h +++ b/scumm/imuse.h @@ -46,7 +46,8 @@ public: enum { PROP_TEMPO_BASE = 1, PROP_NATIVE_MT32 = 2, - PROP_MULTI_MIDI = 3 + PROP_MULTI_MIDI = 3, + PROP_OLD_ADLIB_INSTRUMENTS = 4 }; void on_timer (MidiDriver *midi); diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index 35656ea2ec..59b2c33129 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -606,6 +606,7 @@ Scumm::Scumm (GameDetector *detector, OSystem *syst) if (_imuse) { if (detector->_gameTempo != 0) _imuse->property(IMuse::PROP_TEMPO_BASE, detector->_gameTempo); + _imuse->property (IMuse::PROP_OLD_ADLIB_INSTRUMENTS, (_features & GF_SMALL_HEADER) ? 1 : 0); _imuse->property (IMuse::PROP_MULTI_MIDI, detector->_multi_midi); _imuse->property (IMuse::PROP_NATIVE_MT32, detector->_native_mt32); _imuse->set_music_volume(_sound->_sound_volume_music); diff --git a/sound/mididrv.h b/sound/mididrv.h index fe921df0a4..542eab3f24 100644 --- a/sound/mididrv.h +++ b/sound/mididrv.h @@ -42,7 +42,7 @@ public: enum { PROP_TIMEDIV = 1, - PROP_SMALLHEADER = 2 + PROP_OLD_ADLIB = 2 }; // Open the midi driver. |