aboutsummaryrefslogtreecommitdiff
path: root/engines/queen
diff options
context:
space:
mode:
authorMax Horn2010-06-21 21:36:36 +0000
committerMax Horn2010-06-21 21:36:36 +0000
commitbbad3f333a9227ccb1de633a0fe92d9e01ad7bb3 (patch)
treee5b53717ffc5972cec14be581f586228c245b858 /engines/queen
parent49448af6cb2613460fe37caf79bdb1ed4c206715 (diff)
downloadscummvm-rg350-bbad3f333a9227ccb1de633a0fe92d9e01ad7bb3.tar.gz
scummvm-rg350-bbad3f333a9227ccb1de633a0fe92d9e01ad7bb3.tar.bz2
scummvm-rg350-bbad3f333a9227ccb1de633a0fe92d9e01ad7bb3.zip
Patch #1956501: "GUI/LAUNCHER: Midi device selection"
svn-id: r50128
Diffstat (limited to 'engines/queen')
-rw-r--r--engines/queen/music.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/queen/music.cpp b/engines/queen/music.cpp
index b4b9210616..2bbbd53568 100644
--- a/engines/queen/music.cpp
+++ b/engines/queen/music.cpp
@@ -34,6 +34,7 @@
#include "sound/midiparser.h"
+
namespace Queen {
extern MidiDriver *C_Player_CreateAdLibMidiDriver(Audio::Mixer *);
@@ -45,9 +46,9 @@ MidiMusic::MidiMusic(QueenEngine *vm)
_queuePos = _lastSong = _currentSong = 0;
queueClear();
- MidiDriverType midiDriver = MidiDriver::detectMusicDriver(MDT_MIDI | MDT_ADLIB | MDT_PREFER_MIDI);
- _adlib = (midiDriver == MD_ADLIB);
- _nativeMT32 = ((midiDriver == MD_MT32) || ConfMan.getBool("native_mt32"));
+ MidiDriver::DeviceHandle dev = MidiDriver::detectDevice(MDT_MIDI | MDT_ADLIB | MDT_PREFER_MIDI | MDT_PREFER_MT32);
+ _adlib = (MidiDriver::getMusicType(dev) == MT_ADLIB);
+ _nativeMT32 = ((MidiDriver::getMusicType(dev) == MT_MT32) || ConfMan.getBool("native_mt32"));
const char *musicDataFile;
if (vm->resource()->isDemo()) {
@@ -72,7 +73,7 @@ MidiMusic::MidiMusic(QueenEngine *vm)
// }
_driver = C_Player_CreateAdLibMidiDriver(vm->_mixer);
} else {
- _driver = MidiDriver::createMidi(midiDriver);
+ _driver = MidiDriver::createMidi(dev);
if (_nativeMT32) {
_driver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE);
}