Calculate the panning differently to ensure left and right ears get same amounts

This commit is contained in:
Gwilym Kuiper 2021-06-25 22:12:03 +01:00
parent 290d546248
commit 90551b0ba1

View file

@ -118,7 +118,7 @@ impl MixerBuffer {
}
let right_amount = ((channel.panning + 1) / 2) * channel.volume;
let left_amount = (-right_amount + 1) * channel.volume;
let left_amount = ((-channel.panning + 1) / 2) * channel.volume;
if channel.pos + channel.playback_speed * SOUND_BUFFER_SIZE >= channel.data.len().into()
{