From 3218da897572d5fe0eb9754696c3b49de64c1cf8 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 4 Jan 2010 08:28:09 +0000 Subject: 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 --- engines/sci/sfx/music.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'engines/sci/sfx') 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; } -- cgit v1.2.3