From 0761132779d37c0687c2f4ef4ef8d8fe54b7bd64 Mon Sep 17 00:00:00 2001 From: Gwilym Kuiper Date: Tue, 26 Apr 2022 21:22:50 +0100 Subject: [PATCH] Range of a signed byte is -128 - 127... --- agb/src/sound/mixer/mixer.s | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/agb/src/sound/mixer/mixer.s b/agb/src/sound/mixer/mixer.s index ed03d7ff..887fec1a 100644 --- a/agb/src/sound/mixer/mixer.s +++ b/agb/src/sound/mixer/mixer.s @@ -152,11 +152,11 @@ agb_arm_func agb_rs__mixer_add_stereo agb_arm_end agb_rs__mixer_add_stereo .macro clamp_s8 reg:req - cmn \reg, #127 - mvnlt \reg, #127 + cmn \reg, #128 + mvnlt \reg, #128 - cmp \reg, #128 - movgt \reg, #128 + cmp \reg, #127 + movgt \reg, #127 .endm agb_arm_func agb_rs__mixer_collapse