Skip to content

Commit

Permalink
fix: oversight in SoftwareMixer loop
Browse files Browse the repository at this point in the history
Signed-off-by: Maximilien Noal <noal.maximilien@gmail.com>
  • Loading branch information
maximilien-noal committed May 31, 2024
1 parent 2c1109a commit 72ca774
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Spice86.Core/Emulator/Devices/Sound/SoftwareMixer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ internal int Render(Span<float> data, SoundChannel channel) {
float finalVolumeFactor = volumeFactor * (1 + separation);

Span<float> 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
Expand Down

0 comments on commit 72ca774

Please sign in to comment.