diff options
author | Robin Gareus <robin@gareus.org> | 2017-06-21 14:41:40 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-06-21 18:13:26 +0200 |
commit | 7ab15def2be8bbf156442918e4b8e5f21c8962ba (patch) | |
tree | 2462b5fa834df167566f32a9029fd46690cf091c /libs/ardour/vst_plugin.cc | |
parent | df6655ac682ef99f4d637520d8d1bf8aa5b3beea (diff) |
Consolidate ParameterDescriptor settings+ranges
Diffstat (limited to 'libs/ardour/vst_plugin.cc')
-rw-r--r-- | libs/ardour/vst_plugin.cc | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/libs/ardour/vst_plugin.cc b/libs/ardour/vst_plugin.cc index 23c2751ae3..afed7315f4 100644 --- a/libs/ardour/vst_plugin.cc +++ b/libs/ardour/vst_plugin.cc @@ -321,7 +321,6 @@ VSTPlugin::set_state (const XMLNode& node, int version) return ret; } - int VSTPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& desc) const { @@ -348,12 +347,14 @@ VSTPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& desc) desc.step = prop.stepInteger; desc.smallstep = prop.stepInteger; desc.largestep = prop.stepInteger; + desc.integer_step = true; } else if (prop.flags & kVstParameterUsesFloatStep) { desc.step = prop.stepFloat; desc.smallstep = prop.smallStepFloat; desc.largestep = prop.largeStepFloat; + // desc.rangesteps = (desc.upper - desc.lower) / prop.smallStepFloat; // XXX } else { @@ -369,8 +370,6 @@ VSTPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& desc) } desc.toggled = prop.flags & kVstParameterIsSwitch; - desc.logarithmic = false; - desc.sr_dependent = false; desc.label = Glib::locale_to_utf8 (prop.label); } else { @@ -384,15 +383,11 @@ VSTPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& desc) _plugin->dispatcher (_plugin, effGetParamName, which, 0, label, 0); desc.label = Glib::locale_to_utf8 (label); - desc.integer_step = false; desc.lower = 0.0f; desc.upper = 1.0f; desc.step = 0.01f; desc.smallstep = 0.005f; desc.largestep = 0.1f; - desc.toggled = false; - desc.logarithmic = false; - desc.sr_dependent = false; } desc.normal = get_parameter (which); |