mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
forward port VST parameter name fix from mixbus: some/many VST plugins expect the buffer passed to them to be zero-filled, not just null-at-start. without this they can return garbage strings for parameter names
This commit is contained in:
parent
80d714a34f
commit
12d4c51023
1 changed files with 13 additions and 3 deletions
|
|
@ -295,10 +295,11 @@ VSTPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& desc)
|
|||
/* old style */
|
||||
|
||||
char label[64];
|
||||
label[0] = '\0';
|
||||
/* some VST plugins expect this buffer to be zero-filled */
|
||||
memset (label, sizeof (label), 0);
|
||||
|
||||
_plugin->dispatcher (_plugin, effGetParamName, which, 0, label, 0);
|
||||
|
||||
|
||||
desc.label = label;
|
||||
desc.integer_step = false;
|
||||
desc.lower = 0.0f;
|
||||
|
|
@ -482,8 +483,17 @@ VSTPlugin::do_remove_preset (string name)
|
|||
string
|
||||
VSTPlugin::describe_parameter (Evoral::Parameter param)
|
||||
{
|
||||
char name[64] = "Unkown";
|
||||
char name[64];
|
||||
memset (name, sizeof (name), 0);
|
||||
|
||||
/* some VST plugins expect this buffer to be zero-filled */
|
||||
|
||||
_plugin->dispatcher (_plugin, effGetParamName, param.id(), 0, name, 0);
|
||||
|
||||
if (name[0] == '\0') {
|
||||
strcpy (name, _("Unknown"));
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue