From e88eb16c622cf7e82e9edff7ffba25f933c579c3 Mon Sep 17 00:00:00 2001 From: Gwilym Kuiper Date: Fri, 11 Jun 2021 00:10:06 +0100 Subject: [PATCH] Calculate panning correctly --- agb/src/sound/mixer/mixer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agb/src/sound/mixer/mixer.rs b/agb/src/sound/mixer/mixer.rs index 1106fa4b..9f76b66e 100644 --- a/agb/src/sound/mixer/mixer.rs +++ b/agb/src/sound/mixer/mixer.rs @@ -88,7 +88,7 @@ impl MixerBuffer { continue; } - let right_amount = (channel.panning - 1) / 2; + let right_amount = (channel.panning + 1) / 2; let left_amount = -right_amount + 1; for i in 0..SOUND_BUFFER_SIZE {