summaryrefslogtreecommitdiff
path: root/libs/ardour/vst_plugin.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-05-17 17:01:02 +0200
committerRobin Gareus <robin@gareus.org>2014-05-17 17:01:02 +0200
commit19d99d4bc558d716273e92ab02d15f980ff6fbbd (patch)
tree39ab66b41507250738cc26b9ff2c8e3b53fc3468 /libs/ardour/vst_plugin.cc
parent8b27c122b6424f4d0a0a61e8623876f029614cab (diff)
vst - fix effGetParameterProperties; label may be unset.
Diffstat (limited to 'libs/ardour/vst_plugin.cc')
-rw-r--r--libs/ardour/vst_plugin.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/ardour/vst_plugin.cc b/libs/ardour/vst_plugin.cc
index 52e139db84..a18cc07356 100644
--- a/libs/ardour/vst_plugin.cc
+++ b/libs/ardour/vst_plugin.cc
@@ -250,6 +250,7 @@ VSTPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& desc)
{
VstParameterProperties prop;
+ memset (&prop, 0, sizeof (VstParameterProperties));
desc.min_unbound = false;
desc.max_unbound = false;
prop.flags = 0;
@@ -257,6 +258,7 @@ VSTPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& desc)
if (_plugin->dispatcher (_plugin, effGetParameterProperties, which, 0, &prop, 0)) {
/* i have yet to find or hear of a VST plugin that uses this */
+ /* RG: faust2vsti does use this :) */
if (prop.flags & kVstParameterUsesIntegerMinMax) {
desc.lower = prop.minInteger;
@@ -287,6 +289,10 @@ VSTPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& desc)
desc.largestep = desc.step * 10.0f;
}
+ if (strlen(prop.label) == 0) {
+ _plugin->dispatcher (_plugin, effGetParamName, which, 0, prop.label, 0);
+ }
+
desc.toggled = prop.flags & kVstParameterIsSwitch;
desc.logarithmic = false;
desc.sr_dependent = false;