const all the things
This commit is contained in:
parent
430b54128b
commit
3ab8eb8ad4
2 changed files with 6 additions and 6 deletions
|
|
@ -66,7 +66,7 @@ namespace fx {
|
||||||
auto &down2x = _downsampler2x[c];
|
auto &down2x = _downsampler2x[c];
|
||||||
|
|
||||||
for (unsigned i = 0; i < nframes; ++i) {
|
for (unsigned i = 0; i < nframes; ++i) {
|
||||||
float amount = amounts[i] * 0.01f;
|
const float amount = normalizePercents(amounts[i]);
|
||||||
float in = input[i];
|
float in = input[i];
|
||||||
|
|
||||||
float in2x[2];
|
float in2x[2];
|
||||||
|
|
|
||||||
|
|
@ -49,12 +49,12 @@ namespace fx {
|
||||||
absl::Span<float> output2 { outputs[1], nframes };
|
absl::Span<float> output2 { outputs[1], nframes };
|
||||||
|
|
||||||
for (unsigned i = 0; i < nframes; ++i) {
|
for (unsigned i = 0; i < nframes; ++i) {
|
||||||
float l = input1[i];
|
const float l = input1[i];
|
||||||
float r = input2[i];
|
const float r = input2[i];
|
||||||
|
|
||||||
float w = clamp((widths[i] + 100.0f) * 0.005f, 0.0f, 1.0f);
|
const float w = clamp((widths[i] + 100.0f) * 0.005f, 0.0f, 1.0f);
|
||||||
float coeff1 = _internals::panLookup(w);
|
const float coeff1 = _internals::panLookup(w);
|
||||||
float coeff2 = _internals::panLookup(1.0f - w);
|
const float coeff2 = _internals::panLookup(1.0f - w);
|
||||||
|
|
||||||
output1[i] = l * coeff2 + r * coeff1;
|
output1[i] = l * coeff2 + r * coeff1;
|
||||||
output2[i] = l * coeff1 + r * coeff2;
|
output2[i] = l * coeff1 + r * coeff2;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue