diff options
-rw-r--r-- | engines/made/made.cpp | 2 | ||||
-rw-r--r-- | engines/made/music.cpp | 15 | ||||
-rw-r--r-- | engines/made/music.h | 2 |
3 files changed, 11 insertions, 8 deletions
diff --git a/engines/made/made.cpp b/engines/made/made.cpp index 5d3e6d7069..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(getGameID() == GID_RTZ, (getFeatures() & GF_CD_COMPRESSED) != 0); + _music = new MusicPlayer(getGameID() == GID_RTZ); syncSoundSettings(); // Initialize backend diff --git a/engines/made/music.cpp b/engines/made/music.cpp index 7efa24f985..be66c08aaf 100644 --- a/engines/made/music.cpp +++ b/engines/made/music.cpp @@ -31,24 +31,27 @@ #include "audio/midiparser.h" #include "audio/miles.h" +#include "common/file.h" #include "common/stream.h" namespace Made { -MusicPlayer::MusicPlayer(bool milesAudio, bool compressedCD) : _isGM(false),_milesAudioMode(false) { +MusicPlayer::MusicPlayer(bool milesAudio) : _isGM(false),_milesAudioMode(false) { MusicType musicType; if (milesAudio) { MidiDriver::DeviceHandle dev = MidiDriver::detectDevice(MDT_MIDI | MDT_ADLIB | MDT_PREFER_MT32); musicType = MidiDriver::getMusicType(dev); + Common::SeekableReadStream *adLibInstrumentStream = nullptr; switch (musicType) { case MT_ADLIB: _milesAudioMode = true; - if (compressedCD) { - Common::SeekableReadStream *adLibInstrumentStream = RedReader::loadFromRed("rtzcd.red", "sample.ad"); - _driver = Audio::MidiDriver_Miles_AdLib_create("", "", adLibInstrumentStream); - } else { - _driver = Audio::MidiDriver_Miles_AdLib_create("SAMPLE.AD", "SAMPLE.AD"); + if (Common::File::exists("rtzcd.red")) { + // Installing Return to Zork produces both a SAMPLE.AD and + // a SAMPLE.OPL file, but they are identical. The resource + // file appears to only contain SAMPLE.AD. + adLibInstrumentStream = RedReader::loadFromRed("rtzcd.red", "SAMPLE.AD"); } + _driver = Audio::MidiDriver_Miles_AdLib_create("SAMPLE.AD", "SAMPLE.OPL", adLibInstrumentStream); break; case MT_MT32: _milesAudioMode = true; diff --git a/engines/made/music.h b/engines/made/music.h index 710805d2af..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(bool milesAudio, bool compressedCD); + MusicPlayer(bool milesAudio); void playXMIDI(GenericResource *midiResource, MusicFlags flags = MUSIC_NORMAL); void playSMF(GenericResource *midiResource, MusicFlags flags = MUSIC_NORMAL); |