aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/players/player_nes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/scumm/players/player_nes.cpp')
-rw-r--r--engines/scumm/players/player_nes.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/engines/scumm/players/player_nes.cpp b/engines/scumm/players/player_nes.cpp
index 3b5adc4550..b2f6eb0d40 100644
--- a/engines/scumm/players/player_nes.cpp
+++ b/engines/scumm/players/player_nes.cpp
@@ -1029,11 +1029,7 @@ top:
}
_mchan[x].volume += _mchan[x].voldelta;
-
- if (_mchan[x].volume < 0)
- _mchan[x].volume = 0;
- if (_mchan[x].volume > MAXVOLUME)
- _mchan[x].volume = MAXVOLUME;
+ _mchan[x].volume = CLIP(_mchan[x].volume, 0, MAXVOLUME);
APU_writeChannel(x, 0, (_mchan[x].volume >> 3) | _mchan[x].envflags);
}