diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2017-01-09 11:58:39 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2017-01-09 11:59:02 +0000 |
commit | ad97a069d93febff105b3d473e167c21fd6a1602 (patch) | |
tree | 69f93073a49f8edd548720689163419cd783821d /libs/ardour/ladspa_plugin.cc | |
parent | 0006b50cecff03410a365c4eb6c049cc86751adb (diff) |
fix ranges for LADSPA unbounded toggle parameters.
Used to be 0..4, now 0..1. The 4 is still used as an arbitrary
upper bound for non-toggled parameters
Diffstat (limited to 'libs/ardour/ladspa_plugin.cc')
-rw-r--r-- | libs/ardour/ladspa_plugin.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/ardour/ladspa_plugin.cc b/libs/ardour/ladspa_plugin.cc index 7ca6929112..d8b69c2716 100644 --- a/libs/ardour/ladspa_plugin.cc +++ b/libs/ardour/ladspa_plugin.cc @@ -498,7 +498,11 @@ LadspaPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& des } } else { desc.max_unbound = true; - desc.upper = 4; /* completely arbitrary */ + if (LADSPA_IS_HINT_TOGGLED (prh.HintDescriptor)) { + desc.upper = 1; + } else { + desc.upper = 4; /* completely arbitrary */ + } } if (LADSPA_IS_HINT_HAS_DEFAULT (prh.HintDescriptor)) { |