const all the things

This commit is contained in:
Paul Ferrand 2020-03-27 19:20:32 +01:00
parent 430b54128b
commit 3ab8eb8ad4
2 changed files with 6 additions and 6 deletions

View file

@ -66,7 +66,7 @@ namespace fx {
auto &down2x = _downsampler2x[c];
for (unsigned i = 0; i < nframes; ++i) {
float amount = amounts[i] * 0.01f;
const float amount = normalizePercents(amounts[i]);
float in = input[i];
float in2x[2];

View file

@ -49,12 +49,12 @@ namespace fx {
absl::Span<float> output2 { outputs[1], nframes };
for (unsigned i = 0; i < nframes; ++i) {
float l = input1[i];
float r = input2[i];
const float l = input1[i];
const float r = input2[i];
float w = clamp((widths[i] + 100.0f) * 0.005f, 0.0f, 1.0f);
float coeff1 = _internals::panLookup(w);
float coeff2 = _internals::panLookup(1.0f - w);
const float w = clamp((widths[i] + 100.0f) * 0.005f, 0.0f, 1.0f);
const float coeff1 = _internals::panLookup(w);
const float coeff2 = _internals::panLookup(1.0f - w);
output1[i] = l * coeff2 + r * coeff1;
output2[i] = l * coeff1 + r * coeff2;