Correct pan law so balance in [0, 1] hardpans
parent
1919b0a166
commit
a255009cc0
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue