|
|
|
@@ -1448,7 +1448,9 @@ static intptr_t vst_dispatcherCallback(AEffect* effect, int32_t opcode, int32_t |
|
|
|
memset(properties, 0, sizeof(VstParameterProperties)); |
|
|
|
|
|
|
|
// full name |
|
|
|
DISTRHO_NAMESPACE::strncpy(properties->label, plugin.getParameterName(index), VestigeMaxLabelLen); |
|
|
|
DISTRHO_NAMESPACE::strncpy(properties->label, |
|
|
|
plugin.getParameterName(index), |
|
|
|
sizeof(properties->label)); |
|
|
|
|
|
|
|
// short name |
|
|
|
const String& shortName(plugin.getParameterShortName(index)); |
|
|
|
@@ -1456,7 +1458,7 @@ static intptr_t vst_dispatcherCallback(AEffect* effect, int32_t opcode, int32_t |
|
|
|
if (shortName.isNotEmpty()) |
|
|
|
DISTRHO_NAMESPACE::strncpy(properties->shortLabel, |
|
|
|
plugin.getParameterShortName(index), |
|
|
|
VestigeMaxShortLabelLen); |
|
|
|
sizeof(properties->shortLabel)); |
|
|
|
|
|
|
|
// parameter hints |
|
|
|
const uint32_t hints = plugin.getParameterHints(index); |
|
|
|
@@ -1482,6 +1484,34 @@ static intptr_t vst_dispatcherCallback(AEffect* effect, int32_t opcode, int32_t |
|
|
|
properties->flags |= kVstParameterCanRamp; |
|
|
|
} |
|
|
|
|
|
|
|
// parameter group (category in vst) |
|
|
|
const uint32_t groupId = plugin.getParameterGroupId(index); |
|
|
|
|
|
|
|
if (groupId != kPortGroupNone) |
|
|
|
{ |
|
|
|
// we can't use groupId directly, so use the index array where this group is stored in |
|
|
|
for (uint32_t i=0, count=plugin.getPortGroupCount(); i < count; ++i) |
|
|
|
{ |
|
|
|
const PortGroupWithId& portGroup(plugin.getPortGroupByIndex(i)); |
|
|
|
|
|
|
|
if (portGroup.groupId == groupId) |
|
|
|
{ |
|
|
|
properties->category = i + 1; |
|
|
|
DISTRHO_NAMESPACE::strncpy(properties->categoryLabel, |
|
|
|
portGroup.name.buffer(), |
|
|
|
sizeof(properties->categoryLabel)); |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (properties->category != 0) |
|
|
|
{ |
|
|
|
for (uint32_t i=0, count=plugin.getParameterCount(); i < count; ++i) |
|
|
|
if (plugin.getParameterGroupId(i) == groupId) |
|
|
|
++properties->numParametersInCategory; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return 1; |
|
|
|
} |
|
|
|
} |
|
|
|
|