Bump VST param-name length limit to 128 bytes and centralize definition
The official VST spec says 8 bytes, JUCE uses 24 + 1, and there's anecdotal evidence that some VSTs use up to 100 (which apparently works in many hosts).
This commit is contained in:
parent
82fed14f41
commit
ac03e4a937
@ -204,7 +204,7 @@ struct _VstEvents
|
||||
enum Vestige2StringConstants
|
||||
{
|
||||
VestigeMaxNameLen = 64,
|
||||
VestigeMaxLabelLen = 64,
|
||||
VestigeMaxLabelLen = 128,
|
||||
VestigeMaxShortLabelLen = 8,
|
||||
VestigeMaxCategLabelLen = 24,
|
||||
VestigeMaxFileNameLen = 100
|
||||
|
@ -682,8 +682,8 @@ vstfx_parse_vst_state (VSTState* vstfx)
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < info->numParams; ++i) {
|
||||
char name[64];
|
||||
char label[64];
|
||||
char name[VestigeMaxLabelLen];
|
||||
char label[VestigeMaxLabelLen];
|
||||
|
||||
/* Not all plugins give parameters labels as well as names */
|
||||
|
||||
|
@ -379,7 +379,7 @@ VSTPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& desc)
|
||||
|
||||
/* old style */
|
||||
|
||||
char label[64];
|
||||
char label[VestigeMaxLabelLen];
|
||||
/* some VST plugins expect this buffer to be zero-filled */
|
||||
memset (label, 0, sizeof (label));
|
||||
|
||||
@ -593,7 +593,7 @@ VSTPlugin::do_remove_preset (string name)
|
||||
string
|
||||
VSTPlugin::describe_parameter (Evoral::Parameter param)
|
||||
{
|
||||
char name[64];
|
||||
char name[VestigeMaxLabelLen];
|
||||
if (param.id() == UINT32_MAX - 1) {
|
||||
strcpy (name, _("Plugin Enable"));
|
||||
return name;
|
||||
|
Loading…
Reference in New Issue
Block a user