diff options
author | Adrian Frühwirth | 2018-05-03 21:54:58 +0200 |
---|---|---|
committer | Adrian Frühwirth | 2018-05-05 17:57:31 +0200 |
commit | 49116b4ae7dd31fd736a33913a2969c0653a06cb (patch) | |
tree | 5bce268f0d8227d5a4767da23cb321aedc554063 /engines/cruise | |
parent | c4edac23b2bd8c4024785e8701b61fe1fad13724 (diff) | |
download | scummvm-rg350-49116b4ae7dd31fd736a33913a2969c0653a06cb.tar.gz scummvm-rg350-49116b4ae7dd31fd736a33913a2969c0653a06cb.tar.bz2 scummvm-rg350-49116b4ae7dd31fd736a33913a2969c0653a06cb.zip |
ALL: Use CLIP to clip volumes
Diffstat (limited to 'engines/cruise')
-rw-r--r-- | engines/cruise/sound.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/engines/cruise/sound.cpp b/engines/cruise/sound.cpp index 57dcfcea8f..8d6ca571d1 100644 --- a/engines/cruise/sound.cpp +++ b/engines/cruise/sound.cpp @@ -334,11 +334,7 @@ void AdLibSoundDriver::syncSounds() { void AdLibSoundDriver::adjustVolume(int channel, int volume) { _channelsVolumeTable[channel].original = volume; - if (volume > 80) { - volume = 80; - } else if (volume < 0) { - volume = 0; - } + volume = CLIP(volume, 0, 80); volume += volume / 4; // The higher possible value for volume is 100 |