aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sound/soundcmd.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2011-12-28 13:07:14 +0200
committerFilippos Karapetis2011-12-28 13:14:55 +0200
commit8496b5c4d8134c86735edd90e598d7d94a37bf32 (patch)
tree5a46a8b6090553cad7dab5caa13a677e4d8501ef /engines/sci/sound/soundcmd.cpp
parent26f1643e8646cac71b0adb7b88876674134f3613 (diff)
downloadscummvm-rg350-8496b5c4d8134c86735edd90e598d7d94a37bf32.tar.gz
scummvm-rg350-8496b5c4d8134c86735edd90e598d7d94a37bf32.tar.bz2
scummvm-rg350-8496b5c4d8134c86735edd90e598d7d94a37bf32.zip
SCI: Rename _bMultiMidi to _useDigitalSFX and only initialize it inside SoundCommandParser
Diffstat (limited to 'engines/sci/sound/soundcmd.cpp')
-rw-r--r--engines/sci/sound/soundcmd.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index 274c532779..4b05a7fb11 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -35,17 +35,19 @@ namespace Sci {
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();
// Check if the user wants synthesized or digital sound effects in SCI1.1
// or later games
- _bMultiMidi = ConfMan.getBool("multi_midi");
+ _useDigitalSFX = ConfMan.getBool("multi_midi");
+
// 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;
+ _useDigitalSFX = true;
+
+ _music = new SciMusic(_soundVersion, _useDigitalSFX);
+ _music->init();
}
SoundCommandParser::~SoundCommandParser() {
@@ -93,7 +95,7 @@ void SoundCommandParser::initSoundResource(MusicEntry *newSound) {
// 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 +487,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.