Browse Source

VST: Added a Cockos extension to the VST interface to display parameter labels

tags/2021-05-28
Tom Poole 8 years ago
parent
commit
187d88e75a
1 changed files with 23 additions and 0 deletions
  1. +23
    -0
      modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp

+ 23
- 0
modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp 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()
{


Loading…
Cancel
Save