consistent use of fmaxf() in a-comp
This commit is contained in:
parent
54d8def68c
commit
5966612a4f
@ -309,6 +309,7 @@ run_mono(LV2_Handle instance, uint32_t n_samples)
|
|||||||
in0 = input[i];
|
in0 = input[i];
|
||||||
sc0 = sc[i];
|
sc0 = sc[i];
|
||||||
ingain = usesidechain ? fabs(sc0) : fabs(in0);
|
ingain = usesidechain ? fabs(sc0) : fabs(in0);
|
||||||
|
in_peak = fmaxf (in_peak, ingain);
|
||||||
Lyg = 0.f;
|
Lyg = 0.f;
|
||||||
Lxg = (ingain==0.f) ? -160.f : to_dB(ingain);
|
Lxg = (ingain==0.f) ? -160.f : to_dB(ingain);
|
||||||
Lxg = sanitize_denormal(Lxg);
|
Lxg = sanitize_denormal(Lxg);
|
||||||
@ -336,9 +337,6 @@ run_mono(LV2_Handle instance, uint32_t n_samples)
|
|||||||
|
|
||||||
*(acomp->gainr) = Lyl;
|
*(acomp->gainr) = Lyl;
|
||||||
|
|
||||||
if (ingain > in_peak) {
|
|
||||||
in_peak = ingain;
|
|
||||||
}
|
|
||||||
lgaininp = in0 * Lgain;
|
lgaininp = in0 * Lgain;
|
||||||
output[i] = lgaininp * from_dB(*(acomp->makeup));
|
output[i] = lgaininp * from_dB(*(acomp->makeup));
|
||||||
|
|
||||||
@ -427,6 +425,7 @@ run_stereo(LV2_Handle instance, uint32_t n_samples)
|
|||||||
sc0 = sc[i];
|
sc0 = sc[i];
|
||||||
maxabslr = fmaxf(fabs(in0), fabs(in1));
|
maxabslr = fmaxf(fabs(in0), fabs(in1));
|
||||||
ingain = usesidechain ? fabs(sc0) : maxabslr;
|
ingain = usesidechain ? fabs(sc0) : maxabslr;
|
||||||
|
in_peak = fmaxf (in_peak, ingain);
|
||||||
Lyg = 0.f;
|
Lyg = 0.f;
|
||||||
Lxg = (ingain==0.f) ? -160.f : to_dB(ingain);
|
Lxg = (ingain==0.f) ? -160.f : to_dB(ingain);
|
||||||
Lxg = sanitize_denormal(Lxg);
|
Lxg = sanitize_denormal(Lxg);
|
||||||
@ -454,9 +453,6 @@ run_stereo(LV2_Handle instance, uint32_t n_samples)
|
|||||||
|
|
||||||
*(acomp->gainr) = Lyl;
|
*(acomp->gainr) = Lyl;
|
||||||
|
|
||||||
if (ingain > in_peak) {
|
|
||||||
in_peak = ingain;
|
|
||||||
}
|
|
||||||
lgaininp = in0 * Lgain;
|
lgaininp = in0 * Lgain;
|
||||||
rgaininp = in1 * Lgain;
|
rgaininp = in1 * Lgain;
|
||||||
output0[i] = lgaininp * from_dB(*(acomp->makeup));
|
output0[i] = lgaininp * from_dB(*(acomp->makeup));
|
||||||
|
Loading…
Reference in New Issue
Block a user