diff --git a/modules/juce_audio_plugin_client/VST/juce_VSTCallbackHandler.h b/modules/juce_audio_plugin_client/VST/juce_VSTCallbackHandler.h index 2e959c667c..a39f8977d4 100644 --- a/modules/juce_audio_plugin_client/VST/juce_VSTCallbackHandler.h +++ b/modules/juce_audio_plugin_client/VST/juce_VSTCallbackHandler.h @@ -36,6 +36,18 @@ struct VSTCallbackHandler { virtual ~VSTCallbackHandler() {} + /** This is called by the VST plug-in wrapper when it receives unhandled + plug-in "can do" calls from the host. + */ + virtual pointer_sized_int handleVstPluginCanDo (int32 index, + pointer_sized_int value, + void* ptr, + float opt) + { + ignoreUnused (index, value, ptr, opt); + return 0; + } + /** This is called by the VST plug-in wrapper when it receives unhandled vendor specific calls from the host. */ diff --git a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp index 7c24f986b6..216265ea4d 100644 --- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp @@ -2037,6 +2037,9 @@ private: if (matches ("hasCockosExtensions")) return (int32) 0xbeef0000; + if (auto callbackHandler = dynamic_cast (processor)) + return callbackHandler->handleVstPluginCanDo (args.index, args.value, args.ptr, args.opt); + return 0; }