diff options
Diffstat (limited to 'engines/made')
-rw-r--r-- | engines/made/made.cpp | 2 | ||||
-rw-r--r-- | engines/made/music.cpp | 39 | ||||
-rw-r--r-- | engines/made/music.h | 2 |
3 files changed, 22 insertions, 21 deletions
diff --git a/engines/made/made.cpp b/engines/made/made.cpp index af8156fc3e..ab07ef757b 100644 --- a/engines/made/made.cpp +++ b/engines/made/made.cpp @@ -275,7 +275,7 @@ void MadeEngine::handleEvents() { } Common::Error MadeEngine::run() { - _music = new MusicPlayer(); + _music = new MusicPlayer(getGameID() == GID_RTZ); syncSoundSettings(); // Initialize backend diff --git a/engines/made/music.cpp b/engines/made/music.cpp index b11f071a76..6e5acb88b0 100644 --- a/engines/made/music.cpp +++ b/engines/made/music.cpp @@ -32,25 +32,26 @@ namespace Made { -MusicPlayer::MusicPlayer() : _isGM(false),_milesAudioMode(false) { - MidiDriver::DeviceHandle dev = MidiDriver::detectDevice(MDT_MIDI | MDT_ADLIB | MDT_PREFER_MT32); - MusicType musicType = MidiDriver::getMusicType(dev); - - switch (musicType) { - case MT_ADLIB: - // Adlib disabled due to known issues - //_milesAudioMode = true; - //_driver = Audio::MidiDriver_Miles_AdLib_create("SAMPLE.AD", "SAMPLE.AD"); - MidiPlayer::createDriver(); - break; - case MT_MT32: - _milesAudioMode = true; - _driver = Audio::MidiDriver_Miles_MT32_create(""); - break; - default: - _milesAudioMode = false; - MidiPlayer::createDriver(); - break; +MusicPlayer::MusicPlayer(bool milesAudio) : _isGM(false),_milesAudioMode(false) { + if (milesAudio) { + MidiDriver::DeviceHandle dev = MidiDriver::detectDevice(MDT_MIDI | MDT_ADLIB | MDT_PREFER_MT32); + MusicType musicType = MidiDriver::getMusicType(dev); + switch (musicType) { + case MT_ADLIB: + _milesAudioMode = true; + _driver = Audio::MidiDriver_Miles_AdLib_create("SAMPLE.AD", "SAMPLE.AD"); + break; + case MT_MT32: + _milesAudioMode = true; + _driver = Audio::MidiDriver_Miles_MT32_create(""); + break; + default: + _milesAudioMode = false; + MidiPlayer::createDriver(); + break; + } + } else { + MidiPlayer::createDriver(); } int ret = _driver->open(); diff --git a/engines/made/music.h b/engines/made/music.h index 9c92cd0329..558b41c2e2 100644 --- a/engines/made/music.h +++ b/engines/made/music.h @@ -38,7 +38,7 @@ enum MusicFlags { class MusicPlayer : public Audio::MidiPlayer { public: - MusicPlayer(); + MusicPlayer(bool milesAudio); void playXMIDI(GenericResource *midiResource, MusicFlags flags = MUSIC_NORMAL); void playSMF(GenericResource *midiResource, MusicFlags flags = MUSIC_NORMAL); |