From 7a18ef6cebc8321a64f713cd7f6e8ea906cf2ffc Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 6 Mar 2023 20:34:35 +0100 Subject: [PATCH] Fix LADSPA log-scale default (correct e1ef2c7e0d2) --- libs/ardour/ladspa_plugin.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/ardour/ladspa_plugin.cc b/libs/ardour/ladspa_plugin.cc index 08cc59d5ac..23818711a3 100644 --- a/libs/ardour/ladspa_plugin.cc +++ b/libs/ardour/ladspa_plugin.cc @@ -201,7 +201,7 @@ LadspaPlugin::_default_value (uint32_t port) const else if (LADSPA_IS_HINT_DEFAULT_LOW(prh[port].HintDescriptor)) { if (logarithmic && prh[port].LowerBound * prh[port].UpperBound > 0) { - ret = exp (log(prh[port].LowerBound)) * 0.75f + log (prh[port].UpperBound) * 0.25f; + ret = exp (log(prh[port].LowerBound) * 0.75f + log (prh[port].UpperBound) * 0.25f); } else { ret = prh[port].LowerBound * 0.75f + prh[port].UpperBound * 0.25f; } @@ -210,7 +210,7 @@ LadspaPlugin::_default_value (uint32_t port) const } else if (LADSPA_IS_HINT_DEFAULT_MIDDLE(prh[port].HintDescriptor)) { if (logarithmic && prh[port].LowerBound * prh[port].UpperBound > 0) { - ret = exp (log(prh[port].LowerBound)) * 0.5f + log (prh[port].UpperBound) * 0.5f; + ret = exp (log(prh[port].LowerBound) * 0.5f + log (prh[port].UpperBound) * 0.5f); } else { ret = prh[port].LowerBound * 0.5f + prh[port].UpperBound * 0.5f; } @@ -219,7 +219,7 @@ LadspaPlugin::_default_value (uint32_t port) const } else if (LADSPA_IS_HINT_DEFAULT_HIGH(prh[port].HintDescriptor)) { if (logarithmic && prh[port].LowerBound * prh[port].UpperBound > 0) { - ret = exp (log(prh[port].LowerBound)) * 0.25f + log (prh[port].UpperBound) * 0.75f; + ret = exp (log(prh[port].LowerBound) * 0.25f + log (prh[port].UpperBound) * 0.75f); } else { ret = prh[port].LowerBound * 0.25f + prh[port].UpperBound * 0.75f; }