1
0
Fork 0
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:
Tom Poole 2018-02-12 16:35:01 +00:00
parent 5b8ef5bc1d
commit 187d88e75a

View file

@ -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()
{