mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-28 02:30:05 +00:00
VST: Added a Cockos extension to the VST interface to display parameter labels
This commit is contained in:
parent
5b8ef5bc1d
commit
187d88e75a
1 changed files with 23 additions and 0 deletions
|
|
@ -1931,6 +1931,9 @@ private:
|
|||
if (args.index == presonusVendorID && args.value == presonusSetContentScaleFactor)
|
||||
return handleSetContentScaleFactor (args.opt);
|
||||
|
||||
if (args.index == plugInOpcodeGetParameterText)
|
||||
return handleCockosGetParameterText (args.value, args.ptr, args.opt);
|
||||
|
||||
if (auto callbackHandler = dynamic_cast<VSTCallbackHandler*> (processor))
|
||||
return callbackHandler->handleVstManufacturerSpecific (args.index, args.value, args.ptr, args.opt);
|
||||
|
||||
|
|
@ -1988,6 +1991,9 @@ private:
|
|||
}
|
||||
#endif
|
||||
|
||||
if (matches ("hasCockosExtensions"))
|
||||
return (int32) 0xbeef0000;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -2083,6 +2089,23 @@ private:
|
|||
return 1;
|
||||
}
|
||||
|
||||
pointer_sized_int handleCockosGetParameterText (pointer_sized_int paramIndex,
|
||||
void* destination,
|
||||
float value)
|
||||
{
|
||||
if (processor != nullptr && destination != nullptr)
|
||||
{
|
||||
if (auto* param = processor->getParameters()[(int) paramIndex])
|
||||
{
|
||||
String text (param->getText (value, 1024));
|
||||
memcpy (destination, text.toRawUTF8(), text.length() + 1);
|
||||
return 0xbeef;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
pointer_sized_int handleGetNumMidiInputChannels()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue