diff options
Diffstat (limited to 'engines/toltecs')
-rw-r--r-- | engines/toltecs/menu.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/engines/toltecs/menu.cpp b/engines/toltecs/menu.cpp index d7ba254d9b..dfdad74839 100644 --- a/engines/toltecs/menu.cpp +++ b/engines/toltecs/menu.cpp @@ -582,19 +582,20 @@ void MenuSystem::changeVolumeBar(ItemID itemID, int delta) { switch (itemID) { case kItemIdVoices: _vm->_cfgVoicesVolume = CLIP(_vm->_cfgVoicesVolume + delta, 0, 20); - newVolume = ceil((double)_vm->_cfgVoicesVolume * Audio::Mixer::kMaxChannelVolume / 20); + // Always round volume up instead of down. + newVolume = (_vm->_cfgVoicesVolume * Audio::Mixer::kMaxChannelVolume + 19) / 20; _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, newVolume); ConfMan.setInt("speech_volume", newVolume); break; case kItemIdMusic: _vm->_cfgMusicVolume = CLIP(_vm->_cfgMusicVolume + delta, 0, 20); - newVolume = ceil((double)_vm->_cfgMusicVolume * Audio::Mixer::kMaxChannelVolume / 20); + newVolume = (_vm->_cfgMusicVolume * Audio::Mixer::kMaxChannelVolume + 19) / 20; _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, newVolume); ConfMan.setInt("music_volume", newVolume); break; case kItemIdSoundFX: _vm->_cfgSoundFXVolume = CLIP(_vm->_cfgSoundFXVolume + delta, 0, 20); - newVolume = ceil((double)_vm->_cfgSoundFXVolume * Audio::Mixer::kMaxChannelVolume / 20); + newVolume = (_vm->_cfgSoundFXVolume * Audio::Mixer::kMaxChannelVolume + 19) / 20; _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, newVolume); ConfMan.setInt("sfx_volume", newVolume); break; |