Fixed an Adlib regression with older games (e.g. EGA Loom, Indy 3 and

Monkey VGA) that was introduced by a recent "multi MIDI" change.

The "old Adlib" property was set too late in the iMUSE player, so the Adlib
driver would always think the game was new. I've removed this property from
the iMUSE player, since it's only function appeared to be to pass it on to
the Adlib player, and now set it in the Adlib player directly instead.

Also removed some remaining "multi MIDI" traces from the iMUSE player that
I believe were obsoleted by the aforementioned "multi MIDI" change.

svn-id: r15974
This commit is contained in:
Torbjörn Andersson 2004-12-03 13:17:57 +00:00
parent f03ae8addb
commit 75645cbd40
4 changed files with 3 additions and 14 deletions

View File

@ -44,8 +44,6 @@ namespace Scumm {
////////////////////////////////////////
IMuseInternal::IMuseInternal() :
_old_adlib_instruments(false),
_enable_multi_midi(false),
_native_mt32(false),
_midi_adlib(0),
_midi_native(0),
@ -1077,10 +1075,6 @@ uint32 IMuseInternal::property(int prop, uint32 value) {
initMT32(_midi_native);
break;
case IMuse::PROP_OLD_ADLIB_INSTRUMENTS:
_old_adlib_instruments = (value > 0);
break;
case IMuse::PROP_LIMIT_PLAYERS:
if (value > 0 && value <= ARRAYSIZE(_players))
_player_limit = (int) value;
@ -1135,8 +1129,6 @@ int IMuseInternal::initialize(OSystem *syst, MidiDriver *native_midi, MidiDriver
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 - %s", MidiDriver::getErrorName(result));

View File

@ -52,7 +52,6 @@ public:
enum {
PROP_TEMPO_BASE,
PROP_NATIVE_MT32,
PROP_OLD_ADLIB_INSTRUMENTS,
PROP_LIMIT_PLAYERS,
PROP_RECYCLE_PLAYERS,
PROP_DIRECT_PASSTHROUGH

View File

@ -346,8 +346,6 @@ class IMuseInternal {
friend class Player;
protected:
bool _old_adlib_instruments;
bool _enable_multi_midi;
bool _native_mt32;
MidiDriver *_midi_adlib;
MidiDriver *_midi_native;

View File

@ -1343,16 +1343,16 @@ void ScummEngine::setupMusic(int midi) {
nativeMidiDriver->property (MidiDriver::PROP_CHANNEL_MASK, 0x03FE);
bool multi_midi = ConfMan.getBool("multi_midi") && _midiDriver != MD_NULL && (midi & MDT_ADLIB);
MidiDriver *adlibMidiDriver;
if (nativeMidiDriver == NULL || multi_midi)
if (nativeMidiDriver == NULL || multi_midi) {
adlibMidiDriver = MidiDriver_ADLIB_create(_mixer);
else
adlibMidiDriver->property(MidiDriver::PROP_OLD_ADLIB, (_features & GF_SMALL_HEADER) ? 1 : 0);
} else
adlibMidiDriver = NULL;
_musicEngine = _imuse = IMuse::create(_system, nativeMidiDriver, adlibMidiDriver);
if (_imuse) {
if (ConfMan.hasKey("tempo"))
_imuse->property(IMuse::PROP_TEMPO_BASE, ConfMan.getInt("tempo"));
_imuse->property(IMuse::PROP_OLD_ADLIB_INSTRUMENTS, (_features & GF_SMALL_HEADER) ? 1 : 0);
_imuse->property(IMuse::PROP_NATIVE_MT32, _native_mt32);
if (_features & GF_HUMONGOUS || midi == MDT_TOWNS) {
_imuse->property(IMuse::PROP_LIMIT_PLAYERS, 1);