summaryrefslogtreecommitdiff
path: root/libs/ardour/ladspa_plugin.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-02-15 01:42:48 +0000
committerCarl Hetherington <carl@carlh.net>2011-02-15 01:42:48 +0000
commitea11968f95c626fcba3f31423ed9de13c258bcdc (patch)
tree051d0df74da5196f0c3032cfa7c34d2df46184e5 /libs/ardour/ladspa_plugin.cc
parent4aaa507472ebc7752b32bb4398e694120acd98ee (diff)
Clean up and hopefully fix handling of logarithmic plugin parameters (fixes #3769).
git-svn-id: svn://localhost/ardour2/branches/3.0@8850 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ladspa_plugin.cc')
-rw-r--r--libs/ardour/ladspa_plugin.cc22
1 files changed, 4 insertions, 18 deletions
diff --git a/libs/ardour/ladspa_plugin.cc b/libs/ardour/ladspa_plugin.cc
index 69feed9481..1ea158d7cd 100644
--- a/libs/ardour/ladspa_plugin.cc
+++ b/libs/ardour/ladspa_plugin.cc
@@ -178,32 +178,17 @@ LadspaPlugin::default_value (uint32_t port)
}
else if (LADSPA_IS_HINT_DEFAULT_LOW(prh[port].HintDescriptor)) {
- if (LADSPA_IS_HINT_LOGARITHMIC(prh[port].HintDescriptor)) {
- 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;
- }
+ ret = prh[port].LowerBound * 0.75f + prh[port].UpperBound * 0.25f;
bounds_given = true;
sr_scaling = true;
}
else if (LADSPA_IS_HINT_DEFAULT_MIDDLE(prh[port].HintDescriptor)) {
- if (LADSPA_IS_HINT_LOGARITHMIC(prh[port].HintDescriptor)) {
- 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;
- }
+ ret = prh[port].LowerBound * 0.5f + prh[port].UpperBound * 0.5f;
bounds_given = true;
sr_scaling = true;
}
else if (LADSPA_IS_HINT_DEFAULT_HIGH(prh[port].HintDescriptor)) {
- if (LADSPA_IS_HINT_LOGARITHMIC(prh[port].HintDescriptor)) {
- 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;
- }
+ ret = prh[port].LowerBound * 0.25f + prh[port].UpperBound * 0.75f;
bounds_given = true;
sr_scaling = true;
}
@@ -314,6 +299,7 @@ LadspaPlugin::set_parameter (uint32_t which, float val)
Plugin::set_parameter (which, val);
}
+/** @return `plugin' value */
float
LadspaPlugin::get_parameter (uint32_t which) const
{