Browse Source

Added a method VSTPluginFormat::dispatcher() to allow raw access to a VST's dispatcher function.

tags/2021-05-28
jules 12 years ago
parent
commit
3b2ff2be4e
2 changed files with 18 additions and 0 deletions
  1. +8
    -0
      modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp
  2. +10
    -0
      modules/juce_audio_processors/format_types/juce_VSTPluginFormat.h

+ 8
- 0
modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp View File

@@ -2863,4 +2863,12 @@ void VSTPluginFormat::setExtraFunctions (AudioPluginInstance* plugin, ExtraFunct
vst->extraFunctions = f;
}
VstIntPtr JUCE_CALLTYPE dispatcher (AudioPluginInstance* plugin, int32 opcode, int32 index, VstIntPtr value, void* ptr, float opt)
{
if (VSTPluginInstance* vst = dynamic_cast <VSTPluginInstance*> (plugin))
return vst->dispatch (opcode, index, value, ptr, opt);
return 0;
}
#endif

+ 10
- 0
modules/juce_audio_processors/format_types/juce_VSTPluginFormat.h View File

@@ -79,6 +79,16 @@ public:
*/
static void setExtraFunctions (AudioPluginInstance* plugin, ExtraFunctions* functions);
//==============================================================================
#if JUCE_64BIT
typedef int64 VstIntPtr;
#else
typedef int32 VstIntPtr;
#endif
/** This simply calls directly to the VST's AEffect::dispatcher() function. */
static VstIntPtr JUCE_CALLTYPE dispatcher (AudioPluginInstance*, int32, int32, VstIntPtr, void*, float);
//==============================================================================
String getName() const override { return "VST"; }
void findAllTypesForFile (OwnedArray <PluginDescription>&, const String& fileOrIdentifier) override;


Loading…
Cancel
Save