aboutsummaryrefslogtreecommitdiff
path: root/audio/mixer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'audio/mixer.cpp')
-rw-r--r--audio/mixer.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/audio/mixer.cpp b/audio/mixer.cpp
index 16cf5640eb..274f8e9de6 100644
--- a/audio/mixer.cpp
+++ b/audio/mixer.cpp
@@ -471,10 +471,7 @@ void MixerImpl::setVolumeForSoundType(SoundType type, int volume) {
assert(0 <= (int)type && (int)type < ARRAYSIZE(_soundTypeSettings));
// Check range
- if (volume > kMaxMixerVolume)
- volume = kMaxMixerVolume;
- else if (volume < 0)
- volume = 0;
+ volume = CLIP<int>(volume, 0, kMaxMixerVolume);
// TODO: Maybe we should do logarithmic (not linear) volume
// scaling? See also Player_V2::setMasterVolume