aboutsummaryrefslogtreecommitdiff
path: root/engines/hopkins/sound.cpp
diff options
context:
space:
mode:
authorStrangerke2013-01-23 01:42:31 +0100
committerStrangerke2013-01-23 01:42:31 +0100
commit56ca87b3a573c64e8c82d9c6fa8427ddb5458ba5 (patch)
tree10f67b356d226a5690c87983d9032d39e068f7f9 /engines/hopkins/sound.cpp
parent82ecfd537f8cb52701cc05e39457d00ce71ecb59 (diff)
downloadscummvm-rg350-56ca87b3a573c64e8c82d9c6fa8427ddb5458ba5.tar.gz
scummvm-rg350-56ca87b3a573c64e8c82d9c6fa8427ddb5458ba5.tar.bz2
scummvm-rg350-56ca87b3a573c64e8c82d9c6fa8427ddb5458ba5.zip
HOPKINS: Modify misc setVolume functions so they are a bit less precise
Diffstat (limited to 'engines/hopkins/sound.cpp')
-rw-r--r--engines/hopkins/sound.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/engines/hopkins/sound.cpp b/engines/hopkins/sound.cpp
index 3ef1618d8b..d24c3e10b2 100644
--- a/engines/hopkins/sound.cpp
+++ b/engines/hopkins/sound.cpp
@@ -630,19 +630,17 @@ void SoundManager::PLAY_SOUND2(const Common::String &file) {
void SoundManager::MODSetSampleVolume() {
for (int idx = 0; idx < SWAV_COUNT; ++idx) {
- if (Swav[idx]._active) {
- int volume = (idx == 20) ? (_voiceVolume * 255 / 16) : (_soundVolume * 255 / 16);
+ if (idx != 20 && Swav[idx]._active) {
+ int volume = _soundVolume * 255 / 16;
_vm->_mixer->setChannelVolume(Swav[idx]._soundHandle, volume);
}
}
}
void SoundManager::MODSetVoiceVolume() {
- for (int idx = 0; idx < SWAV_COUNT; ++idx) {
- if (Swav[idx]._active) {
- int volume = (idx == 20) ? (_voiceVolume * 255 / 16) : (_soundVolume * 255 / 16);
- _vm->_mixer->setChannelVolume(Swav[idx]._soundHandle, volume);
- }
+ if (Swav[20]._active) {
+ int volume = _voiceVolume * 255 / 16;
+ _vm->_mixer->setChannelVolume(Swav[20]._soundHandle, volume);
}
}