summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/aica.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/sound/aica.cpp')
-rw-r--r--src/devices/sound/aica.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/devices/sound/aica.cpp b/src/devices/sound/aica.cpp
index 21d5fa081d0..abb5326f43c 100644
--- a/src/devices/sound/aica.cpp
+++ b/src/devices/sound/aica.cpp
@@ -22,8 +22,8 @@
#include <algorithm>
-static constexpr s32 clip16(int x) { return std::min(32767, std::max(-32768, x)); }
-static constexpr s32 clip18(int x) { return std::min(131071, std::max(-131072, x)); }
+static constexpr s32 clip16(int x) { return std::clamp(x, -32768, 32767); }
+static constexpr s32 clip18(int x) { return std::clamp(x, -131072, 131071); }
#define SHIFT 12
#define FIX(v) ((u32)((float)(1 << SHIFT) * (v)))