diff options
author | Filippos Karapetis | 2010-01-04 08:28:09 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-01-04 08:28:09 +0000 |
commit | 3218da897572d5fe0eb9754696c3b49de64c1cf8 (patch) | |
tree | b120aee4405819f1ba57fe57a11318bc8a9de940 /engines | |
parent | ae9cf4d51e8c5f91e9009cab7cef54e23eb83a51 (diff) | |
download | scummvm-rg350-3218da897572d5fe0eb9754696c3b49de64c1cf8.tar.gz scummvm-rg350-3218da897572d5fe0eb9754696c3b49de64c1cf8.tar.bz2 scummvm-rg350-3218da897572d5fe0eb9754696c3b49de64c1cf8.zip |
SCI/new music code: Now the the music driver to use is obtained directly from the sound options, instead of asking for a driver which supports the requested MIDI driver flags
svn-id: r46966
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/sfx/music.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/sci/sfx/music.cpp b/engines/sci/sfx/music.cpp index 4603b30f96..502b82478a 100644 --- a/engines/sci/sfx/music.cpp +++ b/engines/sci/sfx/music.cpp @@ -64,13 +64,8 @@ void SciMusic::init() { // SCI sound init _dwTempo = 0; - _midiType = MidiDriver::detectMusicDriver(MDT_MIDI | MDT_ADLIB | MDT_PCSPK); - - // Sanity check - if (_midiType != MD_ADLIB && _midiType != MD_PCJR && _midiType != MD_PCSPK) { - warning("Unhandled MIDI type, switching to Adlib"); - _midiType = MD_ADLIB; - } + const MidiDriverDescription *md = MidiDriver::findMusicDriver(ConfMan.get("music_driver")); + _midiType = md ? md->id : MD_AUTO; switch (_midiType) { case MD_ADLIB: @@ -86,7 +81,12 @@ void SciMusic::init() { case MD_PCSPK: _pMidiDrv = new MidiPlayer_PCSpeaker(); break; + case MD_MT32: + // TODO default: + warning("Unhandled MIDI type, switching to Adlib"); + _midiType = MD_ADLIB; + _pMidiDrv = MidiPlayer_Adlib_create(); break; } |