From 1e3679b4b6ef1645b1e4f8346d0b2e951417c78e Mon Sep 17 00:00:00 2001 From: Walter van Niftrik Date: Sat, 9 Jan 2010 03:08:51 +0000 Subject: SCI: Cleanup svn-id: r47194 --- engines/sci/sound/music.cpp | 20 +++----------------- engines/sci/sound/music.h | 1 - 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp index aa64c30d83..1bb4fa883f 100644 --- a/engines/sci/sound/music.cpp +++ b/engines/sci/sound/music.cpp @@ -63,23 +63,9 @@ void SciMusic::init() { // SCI sound init _dwTempo = 0; - const MidiDriverDescription *md = MidiDriver::findMusicDriver(ConfMan.get("music_driver")); - _midiType = md ? md->id : MD_AUTO; + MidiDriverType midiType = MidiDriver::detectMusicDriver(MDT_PCSPK | MDT_ADLIB); - if (_midiType == MD_AUTO) - _midiType = MD_ADLIB; - - switch (_midiType) { - case MD_ADLIB: - case MD_PCJR: - case MD_PCSPK: - break; - default: - warning("Unhandled MIDI type, switching to default"); - _midiType = MD_ADLIB; - } - - switch (_midiType) { + switch (midiType) { case MD_ADLIB: // FIXME: There's no Amiga sound option, so we hook it up to Adlib if (((SciEngine *)g_engine)->getPlatform() == Common::kPlatformAmiga) @@ -96,7 +82,7 @@ void SciMusic::init() { //case MD_MT32: // TODO default: - error("Unsupported _midiType setup %d", _midiType); + error("Unsupported _midiType setup %d", midiType); } if (_pMidiDrv) { diff --git a/engines/sci/sound/music.h b/engines/sci/sound/music.h index f9c62fd423..ce1570eb2c 100644 --- a/engines/sci/sound/music.h +++ b/engines/sci/sound/music.h @@ -214,7 +214,6 @@ protected: Audio::Mixer *_pMixer; MidiPlayer *_pMidiDrv; - MidiDriverType _midiType; uint32 _dwTempo; // Mixed Adlib/MIDI mode: when enabled from the ScummVM sound options screen, -- cgit v1.2.3