diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc index 0f78777d13..7a98b874e0 100644 --- a/libs/ardour/plugin_insert.cc +++ b/libs/ardour/plugin_insert.cc @@ -3037,10 +3037,10 @@ PluginInsert::PluginControl::get_user_string () const { boost::shared_ptr plugin = _plugin->plugin (0); if (plugin) { - char buf[32]; + char buf[64]; if (plugin->print_parameter (parameter().id(), buf, sizeof(buf))) { assert (strlen (buf) > 0); - return std::string (buf) + " (" + AutomationControl::get_user_string () + ")"; + return std::string (buf); } } return AutomationControl::get_user_string (); diff --git a/libs/ardour/vst_plugin.cc b/libs/ardour/vst_plugin.cc index ebce493d4c..8d8d46e090 100644 --- a/libs/ardour/vst_plugin.cc +++ b/libs/ardour/vst_plugin.cc @@ -406,13 +406,13 @@ VSTPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& desc) /* old style */ - char label[VestigeMaxLabelLen]; + char pname[VestigeMaxLabelLen]; /* some VST plugins expect this buffer to be zero-filled */ - memset (label, 0, sizeof (label)); + memset (pname, 0, sizeof (pname)); - _plugin->dispatcher (_plugin, effGetParamName, which, 0, label, 0); + _plugin->dispatcher (_plugin, effGetParamName, which, 0, pname, 0); - desc.label = Glib::locale_to_utf8 (label); + desc.label = Glib::locale_to_utf8 (pname); desc.lower = 0.0f; desc.upper = 1.0f; desc.smallstep = desc.step = 1.f / 300.f; @@ -834,6 +834,17 @@ VSTPlugin::print_parameter (uint32_t param, char *buf, uint32_t len) const } memmove (buf, first_nonws, strlen (buf) - (first_nonws - buf) + 1); + + /* optional Unit label */ + char label[VestigeMaxNameLen]; + memset (label, 0, sizeof (label)); + _plugin->dispatcher (_plugin, 6 /* effGetParamLabel */, param, 0, label, 0); + + if (strlen (label) > 0) { + std::string lbl = std::string (" ") + Glib::locale_to_utf8 (label); + strncat (buf, lbl.c_str(), strlen (buf) - 1); + } + return true; }