diff options
author | Filippos Karapetis | 2010-06-22 15:01:45 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-06-22 15:01:45 +0000 |
commit | 5855cd7127c9c7b40a67dd9d8aecbd065fc231b9 (patch) | |
tree | 8ae0d17964d911a76777094720b9fadddddedb3d /engines/sci/engine | |
parent | 019657fcd6278906a4c96425c438cc98808fd172 (diff) | |
download | scummvm-rg350-5855cd7127c9c7b40a67dd9d8aecbd065fc231b9.tar.gz scummvm-rg350-5855cd7127c9c7b40a67dd9d8aecbd065fc231b9.tar.bz2 scummvm-rg350-5855cd7127c9c7b40a67dd9d8aecbd065fc231b9.zip |
The volume subop of kDoAudio returns the previous volume in SCI2.1, but not in earlier versions
svn-id: r50141
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/ksound.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp index 46f9aa95d8..0172b005ac 100644 --- a/engines/sci/engine/ksound.cpp +++ b/engines/sci/engine/ksound.cpp @@ -152,8 +152,15 @@ reg_t kDoAudio(EngineState *s, int argc, reg_t *argv) { int16 volume = argv[1].toUint16(); volume = CLIP<int16>(volume, 0, AUDIO_VOLUME_MAX); debugC(2, kDebugLevelSound, "kDoAudio: set volume to %d", volume); +#ifdef ENABLE_SCI32 + if (getSciVersion() >= SCI_VERSION_2_1) { + int16 volumePrev = mixer->getVolumeForSoundType(Audio::Mixer::kSpeechSoundType) / 2; + volumePrev = CLIP<int16>(volumePrev, 0, AUDIO_VOLUME_MAX); + mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, volume * 2); + return make_reg(0, volumePrev); + } else +#endif mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, volume * 2); - return make_reg(0, volume); } case kSciAudioLanguage: // In SCI1.1: tests for digital audio support |