diff options
author | Martin Kiewitz | 2010-01-01 21:26:46 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-01-01 21:26:46 +0000 |
commit | 44dc3f9bfbac271fb566ea603f720616b958d31c (patch) | |
tree | 0c1d241f1906e16f2a0b0a08a8d4f4dbe5306f46 /engines/sci/engine | |
parent | f3ca535038a50a4a98c1fb698cddc0a7f9cf1d64 (diff) | |
download | scummvm-rg350-44dc3f9bfbac271fb566ea603f720616b958d31c.tar.gz scummvm-rg350-44dc3f9bfbac271fb566ea603f720616b958d31c.tar.bz2 scummvm-rg350-44dc3f9bfbac271fb566ea603f720616b958d31c.zip |
SCI: kDoAudio now also clips volume and adjusts to mixer volume
svn-id: r46852
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/ksound.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp index 4b5471659c..d70b23c13f 100644 --- a/engines/sci/engine/ksound.cpp +++ b/engines/sci/engine/ksound.cpp @@ -131,9 +131,12 @@ reg_t kDoAudio(EngineState *s, int argc, reg_t *argv) { case kSciAudioRate: s->_audio->setAudioRate(argv[1].toUint16()); break; - case kSciAudioVolume: - mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, argv[1].toUint16()); + case kSciAudioVolume: { + int16 volume = argv[1].toUint16(); + volume = CLIP<int16>(volume, 0, AUDIO_VOLUME_MAX); + mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, volume * 2); break; + } case kSciAudioLanguage: // In SCI1.1: tests for digital audio support if (getSciVersion() == SCI_VERSION_1_1) |