aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sound/soundcmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/sound/soundcmd.cpp')
-rw-r--r--engines/sci/sound/soundcmd.cpp30
1 files changed, 19 insertions, 11 deletions
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index 274c532779..b8be898abc 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -32,20 +32,30 @@
namespace Sci {
+//#define ENABLE_SFX_TYPE_SELECTION
+
SoundCommandParser::SoundCommandParser(ResourceManager *resMan, SegManager *segMan, Kernel *kernel, AudioPlayer *audio, SciVersion soundVersion) :
_resMan(resMan), _segMan(segMan), _kernel(kernel), _audio(audio), _soundVersion(soundVersion) {
- _music = new SciMusic(_soundVersion);
- _music->init();
+#ifdef ENABLE_SFX_TYPE_SELECTION
// Check if the user wants synthesized or digital sound effects in SCI1.1
- // or later games
- _bMultiMidi = ConfMan.getBool("multi_midi");
+ // games based on the multi_midi config setting
+
// In SCI2 and later games, this check should always be true - there was
// always only one version of each sound effect or digital music track
// (e.g. the menu music in GK1 - there is a sound effect with the same
// resource number, but it's totally unrelated to the menu music).
- if (getSciVersion() >= SCI_VERSION_2)
- _bMultiMidi = true;
+ // The GK1 demo (very late SCI1.1) does the same thing
+ // TODO: Check the QFG4 demo
+
+ _useDigitalSFX = (getSciVersion() >= SCI_VERSION_2 || g_sci->getGameId() == GID_GK1 || ConfMan.getBool("multi_midi"));
+#else
+ // Always prefer digital sound effects
+ _useDigitalSFX = true;
+#endif
+
+ _music = new SciMusic(_soundVersion, _useDigitalSFX);
+ _music->init();
}
SoundCommandParser::~SoundCommandParser() {
@@ -84,16 +94,14 @@ void SoundCommandParser::initSoundResource(MusicEntry *newSound) {
// effects map)
bool checkAudioResource = getSciVersion() >= SCI_VERSION_1_1;
// Hoyle 4 has garbled audio resources in place of the sound resources.
- // The demo of GK1 has no alternate sound effects.
- if ((g_sci->getGameId() == GID_HOYLE4) ||
- (g_sci->getGameId() == GID_GK1 && g_sci->isDemo()))
+ if (g_sci->getGameId() == GID_HOYLE4)
checkAudioResource = false;
if (checkAudioResource && _resMan->testResource(ResourceId(kResourceTypeAudio, newSound->resourceId))) {
// Found a relevant audio resource, create an audio stream if there is
// no associated sound resource, or if both resources exist and the
// user wants the digital version.
- if (_bMultiMidi || !newSound->soundRes) {
+ if (_useDigitalSFX || !newSound->soundRes) {
int sampleLen;
newSound->pStreamAud = _audio->getAudioStream(newSound->resourceId, 65535, &sampleLen);
newSound->soundType = Audio::Mixer::kSpeechSoundType;
@@ -485,7 +493,7 @@ void SoundCommandParser::processUpdateCues(reg_t obj) {
} else {
// Slot actually has no data (which would mean that a sound-resource w/
// unsupported data is used.
- // (example lsl5 - sound resource 744 - it's roland exclusive
+ // (example lsl5 - sound resource 744 - it's Roland exclusive
writeSelectorValue(_segMan, obj, SELECTOR(signal), SIGNAL_OFFSET);
// If we don't set signal here, at least the switch to the mud wrestling
// room in lsl5 will not work.