From 72ca774246c10ba849a0d9e5f624b780e581b51d Mon Sep 17 00:00:00 2001 From: Maximilien Noal Date: Fri, 31 May 2024 17:48:42 +0200 Subject: [PATCH] fix: oversight in SoftwareMixer loop Signed-off-by: Maximilien Noal --- src/Spice86.Core/Emulator/Devices/Sound/SoftwareMixer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Spice86.Core/Emulator/Devices/Sound/SoftwareMixer.cs b/src/Spice86.Core/Emulator/Devices/Sound/SoftwareMixer.cs index 6de46ce8a5..d14c126884 100644 --- a/src/Spice86.Core/Emulator/Devices/Sound/SoftwareMixer.cs +++ b/src/Spice86.Core/Emulator/Devices/Sound/SoftwareMixer.cs @@ -42,7 +42,7 @@ internal int Render(Span data, SoundChannel channel) { float finalVolumeFactor = volumeFactor * (1 + separation); Span target = stackalloc float[data.Length]; - for (int i = 0; i < data.Length; i++) { + for (int i = 0; i < data.Length; i += 2) { // Apply volume and separation to left channel target[i] = data[i] * finalVolumeFactor; // Ensure we don't go out of range