Get access to AEffect and AudioMasterCallback in VST2 and host context in VST3

In my plugins I need access to the VST2 AEffect pointer as well as the AudioMasterCallback and in VST3 plugins the host context pointer passed to initialize (FUnknown* hostContext). I’ve managed so far by doing some modifications into the Juce code but I am wondering, could there be any chance to get access to these while using the official code base too?

Can’t you do this already with a call to AudioPluginInstance::getPlatformSpecificData (and obviously a bit of legwork)?

There’s no AudioPluginInstance in the code that is built as a plugin…(I am building VST2/3 plugins in this case and I want to have access to some special 3rd party host functions and the host in question does not have anything to do with Juce.)

GOOD point. I don’t think there’s a stored pointer to the internal data, or one exposed to the users (yet?).

The changes I needed to do to Juce are in these files at the source locations the links point to :

https://bitbucket.org/xenakios/reaper_api_vst_example/src/a5dcc23692a91a118a96853930fc3ad4951330fc/ModifiedJuce/juce_AudioProcessor.h?at=master&fileviewer=file-view-default#juce_AudioProcessor.h-1364

https://bitbucket.org/xenakios/reaper_api_vst_example/src/a5dcc23692a91a118a96853930fc3ad4951330fc/ModifiedJuce/juce_VST3_Wrapper.cpp?at=master&fileviewer=file-view-default#juce_VST3_Wrapper.cpp-1137

https://bitbucket.org/xenakios/reaper_api_vst_example/src/a5dcc23692a91a118a96853930fc3ad4951330fc/ModifiedJuce/juce_VST_Wrapper.cpp?at=master&fileviewer=file-view-default#juce_VST_Wrapper.cpp-2103

Probably not the best design to do this but I just needed to get it done in some way. Maybe the Juce developers can figure out something cleaner… :wink:

Maybe I have misunderstood, but at least you get the VST2 AEffect pointer by calling AudioPluginInstance::getPlatformSpecificData().

You have misunderstood. I am not hosting the plugins, so there’s no AudioPluginInstance.

1 Like

Sorry, I didn’t read the rest of the thread where you already answered this. (Well, I read it yesterday.)