aboutsummaryrefslogtreecommitdiff
path: root/kyra
diff options
context:
space:
mode:
authorMax Horn2005-12-30 14:18:21 +0000
committerMax Horn2005-12-30 14:18:21 +0000
commit60fcd5a1713d143cd6fb4d0a9c6f3be030c65b5b (patch)
tree6f72d5cd2ed9d83c2087130e5ca1e236b70aaa1c /kyra
parent2b156bd4c1d334931513a834a757723ec290db0b (diff)
downloadscummvm-rg350-60fcd5a1713d143cd6fb4d0a9c6f3be030c65b5b.tar.gz
scummvm-rg350-60fcd5a1713d143cd6fb4d0a9c6f3be030c65b5b.tar.bz2
scummvm-rg350-60fcd5a1713d143cd6fb4d0a9c6f3be030c65b5b.zip
* Replaced MDT_PREFER_NATIVE/MDT_NATIVE by MDT_PREFER_MIDI/MDT_MIDI).
* Changed MidiDriver::createMidi so that if MD_ADLIB is passed, it now *does* instantiate the adlib driver. * Rewrote MidiDriver::detectMusicDriver (code should be clearer now, and hopefully easier to adapt/maintain). Note that the behavior changed slightly (this may require some tweaking). * Added MidiDriver::findMusicDriver which works similar to the old MidiDriver::parseMusicDriver but returns the full MidiDriverDescription and ignores all characters in the passed driver name following a colon ":". * Changed MidiDriver::parseMusicDriver to use MidiDriver::findMusicDriver. * Changed game engines to match the changes made to MidiDriver. * Modified SCUMM engine to not record the selected midi/music driver (in _midiDriver), but rather the music *type* (in _musicType). svn-id: r19859
Diffstat (limited to 'kyra')
-rw-r--r--kyra/kyra.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/kyra/kyra.cpp b/kyra/kyra.cpp
index 9a2c8ab43e..e9b452b495 100644
--- a/kyra/kyra.cpp
+++ b/kyra/kyra.cpp
@@ -258,14 +258,13 @@ int KyraEngine::init(GameDetector &detector) {
_system->endGFXTransaction();
// for now we prefer MIDI-to-Adlib conversion over native midi
- int midiDrv = MidiDriver::detectMusicDriver(MDT_NATIVE | MDT_ADLIB/* | MDT_PREFER_NATIVE*/);
- bool native_mt32 = (ConfMan.getBool("native_mt32") || (midiDrv == MD_MT32));
+ int midiDrv = MidiDriver::detectMusicDriver(MDT_MIDI | MDT_ADLIB/* | MDT_PREFER_MIDI*/);
+ bool native_mt32 = ((midiDrv == MD_MT32) || ConfMan.getBool("native_mt32"));
MidiDriver *driver = MidiDriver::createMidi(midiDrv);
- if (!driver) {
+ if (midiDriver == MD_ADLIB) {
// In this case we should play the Adlib tracks, but for now
// the automagic MIDI-to-Adlib conversion will do.
- driver = MidiDriver_ADLIB_create(_mixer);
} else if (native_mt32) {
driver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE);
}