From ad97a069d93febff105b3d473e167c21fd6a1602 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 9 Jan 2017 11:58:39 +0000 Subject: 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 --- libs/ardour/ladspa_plugin.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libs/ardour/ladspa_plugin.cc') 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)) { -- cgit v1.2.3