aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/sfx/music.cpp15
-rw-r--r--engines/sci/sfx/music.h4
2 files changed, 9 insertions, 10 deletions
diff --git a/engines/sci/sfx/music.cpp b/engines/sci/sfx/music.cpp
index 6f28aa0718..30721f0531 100644
--- a/engines/sci/sfx/music.cpp
+++ b/engines/sci/sfx/music.cpp
@@ -307,20 +307,17 @@ void SciMusic::soundInitSnd(MusicEntry *pSnd) {
track = pSnd->soundRes->getTrackByType(SoundResource::TRACKTYPE_MT32);
break;
default:
+ // Should never occur
+ error("soundInitSnd: Unknown MIDI type");
break;
}
- // attempting to select default MT-32/Roland track
- if (!track)
- track = pSnd->soundRes->getTrackByType(SoundResource::TRACKTYPE_MT32);
if (track) {
- // if MIDI device is selected but there is no digital track in sound resource
+ // If MIDI device is selected but there is no digital track in sound resource
// try to use adlib's digital sample if possible
- if (_midiType <= MD_MT32 && track->digitalChannelNr == -1 && _bMultiMidi) {
- if (pSnd->soundRes->getTrackByType(SoundResource::TRACKTYPE_ADLIB)->digitalChannelNr != -1)
- track = pSnd->soundRes->getTrackByType(SoundResource::TRACKTYPE_ADLIB);
- }
- // play digital sample
+ if (_bMultiMidi && pSnd->soundRes->getTrackByType(SoundResource::TRACKTYPE_ADLIB)->digitalChannelNr != -1)
+ track = pSnd->soundRes->getTrackByType(SoundResource::TRACKTYPE_ADLIB);
+ // Play digital sample
if (track->digitalChannelNr != -1) {
byte *channelData = track->channels[track->digitalChannelNr].data;
delete pSnd->pStreamAud;
diff --git a/engines/sci/sfx/music.h b/engines/sci/sfx/music.h
index 7f9bd413bc..0b7d880112 100644
--- a/engines/sci/sfx/music.h
+++ b/engines/sci/sfx/music.h
@@ -203,7 +203,9 @@ protected:
MidiDriverType _midiType;
uint32 _dwTempo;
- bool _bMultiMidi; // use adlib's digital track if midi track don't have one
+ // Mixed Adlib/MIDI mode: when enabled from the ScummVM sound options screen,
+ // and a sound has a digital track, the sound from the Adlib track is played
+ bool _bMultiMidi;
private:
static void miditimerCallback(void *p);