Calculate panning correctly

This commit is contained in:
Gwilym Kuiper 2021-06-11 00:10:06 +01:00
parent d28b885e29
commit e88eb16c62

View file

@ -88,7 +88,7 @@ impl MixerBuffer {
continue; continue;
} }
let right_amount = (channel.panning - 1) / 2; let right_amount = (channel.panning + 1) / 2;
let left_amount = -right_amount + 1; let left_amount = -right_amount + 1;
for i in 0..SOUND_BUFFER_SIZE { for i in 0..SOUND_BUFFER_SIZE {