1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-04 07:40:12 +01:00

Merge pull request #42 from spider-mario/ladspa-default-values

LADSPA: correctly compute the default value for logarithmic control ports
This commit is contained in:
Leland Lucius
2015-05-16 11:13:46 -05:00

View File

@@ -618,7 +618,7 @@ bool LadspaEffect::SetHost(EffectHostInterface *host)
{ {
if (LADSPA_IS_HINT_LOGARITHMIC(hint.HintDescriptor)) if (LADSPA_IS_HINT_LOGARITHMIC(hint.HintDescriptor))
{ {
val = exp(log(lower)) * 0.75f + log(upper) * 0.25f; val = exp(log(lower) * 0.75f + log(upper) * 0.25f);
} }
else else
{ {
@@ -630,7 +630,7 @@ bool LadspaEffect::SetHost(EffectHostInterface *host)
{ {
if (LADSPA_IS_HINT_LOGARITHMIC(hint.HintDescriptor)) if (LADSPA_IS_HINT_LOGARITHMIC(hint.HintDescriptor))
{ {
val = exp(log(lower)) * 0.5f + log(upper) * 0.5f; val = exp(log(lower) * 0.5f + log(upper) * 0.5f);
} }
else else
{ {
@@ -642,7 +642,7 @@ bool LadspaEffect::SetHost(EffectHostInterface *host)
{ {
if (LADSPA_IS_HINT_LOGARITHMIC(hint.HintDescriptor)) if (LADSPA_IS_HINT_LOGARITHMIC(hint.HintDescriptor))
{ {
val = exp(log(lower)) * 0.25f + log(upper) * 0.75f; val = exp(log(lower) * 0.25f + log(upper) * 0.75f);
} }
else else
{ {