mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-05 16:58:09 +00:00
KYRA: fix audio detection
Don't attempt to detect PC devices for non-PC versions of the game, because this might trigger unnecessary detection failure messages.
This commit is contained in:
parent
43075248aa
commit
920c3bb172
@ -93,15 +93,6 @@ Common::Error KyraEngine_v1::init() {
|
||||
syncSoundSettings();
|
||||
|
||||
if (!_flags.useDigSound) {
|
||||
// In Kyra 1 users who have specified a default MT-32 device in the launcher settings
|
||||
// will get MT-32 music, otherwise AdLib. In Kyra 2 and LoL users who have specified a
|
||||
// default GM device in the launcher will get GM music, otherwise AdLib. Users who want
|
||||
// MT-32 music in Kyra2 or LoL have to select this individually (since we assume that
|
||||
// most users rather have a GM device than a MT-32 device).
|
||||
// Users who want PC speaker sound always have to select this individually for all
|
||||
// Kyra games.
|
||||
MidiDriver::DeviceHandle dev = MidiDriver::detectDevice(MDT_PCSPK | MDT_MIDI | MDT_ADLIB | ((_flags.gameID == GI_KYRA2 || _flags.gameID == GI_LOL) ? MDT_PREFER_GM : MDT_PREFER_MT32));
|
||||
|
||||
if (_flags.platform == Common::kPlatformFMTowns) {
|
||||
if (_flags.gameID == GI_KYRA1)
|
||||
_sound = new SoundTowns(this, _mixer);
|
||||
@ -114,7 +105,16 @@ Common::Error KyraEngine_v1::init() {
|
||||
_sound = new SoundTownsPC98_v2(this, _mixer);
|
||||
} else if (_flags.platform == Common::kPlatformAmiga) {
|
||||
_sound = new SoundAmiga(this, _mixer);
|
||||
} else if (MidiDriver::getMusicType(dev) == MT_ADLIB) {
|
||||
} else {
|
||||
// In Kyra 1 users who have specified a default MT-32 device in the launcher settings
|
||||
// will get MT-32 music, otherwise AdLib. In Kyra 2 and LoL users who have specified a
|
||||
// default GM device in the launcher will get GM music, otherwise AdLib. Users who want
|
||||
// MT-32 music in Kyra2 or LoL have to select this individually (since we assume that
|
||||
// most users rather have a GM device than a MT-32 device).
|
||||
// Users who want PC speaker sound always have to select this individually for all
|
||||
// Kyra games.
|
||||
MidiDriver::DeviceHandle dev = MidiDriver::detectDevice(MDT_PCSPK | MDT_MIDI | MDT_ADLIB | ((_flags.gameID == GI_KYRA2 || _flags.gameID == GI_LOL) ? MDT_PREFER_GM : MDT_PREFER_MT32));
|
||||
if (MidiDriver::getMusicType(dev) == MT_ADLIB) {
|
||||
_sound = new SoundAdLibPC(this, _mixer);
|
||||
} else {
|
||||
Sound::kType type;
|
||||
@ -153,6 +153,7 @@ Common::Error KyraEngine_v1::init() {
|
||||
_sound = new MixedSoundDriver(this, _mixer, soundMidiPc, adlib);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
assert(_sound);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user