diff --git a/src/lib.rs b/src/lib.rs index bc5a111..9d3da34 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -29,8 +29,8 @@ fn decode_signal_balance(channel_0: &mut [f32], channel_1: &mut [f32]) { let sig = channel_0[sample_idx]; let balance = channel_1[sample_idx]; - let left = sig * (0.5 * -balance + 1.0); - let right = sig * (0.5 * balance + 1.0); + let left = sig * (1.0 - balance) * 0.5; + let right = sig * (1.0 + balance) * 0.5; channel_0[sample_idx] = left; channel_1[sample_idx] = right;