aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sound
diff options
context:
space:
mode:
authorFilippos Karapetis2012-08-20 03:22:56 +0300
committerFilippos Karapetis2012-08-20 03:22:56 +0300
commitb19ccb9d1edcdf238727f0c3b0a731b2f00e9d3d (patch)
tree64ce83791005cc88bfad0c2fb278b883ba05d0b7 /engines/sci/sound
parent8524ebd699254a6786033f0e41b9a45c563feb11 (diff)
downloadscummvm-rg350-b19ccb9d1edcdf238727f0c3b0a731b2f00e9d3d.tar.gz
scummvm-rg350-b19ccb9d1edcdf238727f0c3b0a731b2f00e9d3d.tar.bz2
scummvm-rg350-b19ccb9d1edcdf238727f0c3b0a731b2f00e9d3d.zip
SCI: Set the correct audio type for SCI1.1 sound effects, fixing bug #3554709
Now, sound effects in SCI1.1 games will no longer be incorrectly using the speech sound volume. This avoids them being silenced in floppy games that are flagged as not having speech. Fixes bug #3554709 - "SCI: Digital SFX don't play when Override Global Audio set"
Diffstat (limited to 'engines/sci/sound')
-rw-r--r--engines/sci/sound/audio.cpp3
-rw-r--r--engines/sci/sound/soundcmd.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/engines/sci/sound/audio.cpp b/engines/sci/sound/audio.cpp
index 123dd21894..528bb51393 100644
--- a/engines/sci/sound/audio.cpp
+++ b/engines/sci/sound/audio.cpp
@@ -67,7 +67,8 @@ int AudioPlayer::startAudio(uint16 module, uint32 number) {
if (audioStream) {
_wPlayFlag = false;
- _mixer->playStream(Audio::Mixer::kSpeechSoundType, &_audioHandle, audioStream);
+ Audio::Mixer::SoundType soundType = (module == 65535) ? Audio::Mixer::kSFXSoundType : Audio::Mixer::kSpeechSoundType;
+ _mixer->playStream(soundType, &_audioHandle, audioStream);
return sampleLen;
} else {
// Don't throw a warning in this case. getAudioStream() already has. Some games
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index 1570e360e8..5d32f40f18 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -96,7 +96,7 @@ void SoundCommandParser::initSoundResource(MusicEntry *newSound) {
if (_useDigitalSFX || !newSound->soundRes) {
int sampleLen;
newSound->pStreamAud = _audio->getAudioStream(newSound->resourceId, 65535, &sampleLen);
- newSound->soundType = Audio::Mixer::kSpeechSoundType;
+ newSound->soundType = Audio::Mixer::kSFXSoundType;
}
}