aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWalter van Niftrik2010-01-09 03:08:51 +0000
committerWalter van Niftrik2010-01-09 03:08:51 +0000
commit1e3679b4b6ef1645b1e4f8346d0b2e951417c78e (patch)
tree3785684dccd5f92946f7e6ea5bdaa72511a38596
parentac7458f91608d89c5921f0de6581ac1f139c68bd (diff)
downloadscummvm-rg350-1e3679b4b6ef1645b1e4f8346d0b2e951417c78e.tar.gz
scummvm-rg350-1e3679b4b6ef1645b1e4f8346d0b2e951417c78e.tar.bz2
scummvm-rg350-1e3679b4b6ef1645b1e4f8346d0b2e951417c78e.zip
SCI: Cleanup
svn-id: r47194
-rw-r--r--engines/sci/sound/music.cpp20
-rw-r--r--engines/sci/sound/music.h1
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,