In the example AudioPluginHost code, it runs a callback with a juce:AudioPluginInstance when a plugin is loaded. How can I access the actual plugin instance rather than this wrapper to the instance?
For example, my plugin’s entry point is MyPluginProcessor extends juce::AudioProcessor and MyPluginInterface, what would be the proper way to get MyPluginProcessor out off juce:AudioPluginInstance in my host code?
class MyPluginProcessor : public juce::AudioProcessor, public MyPluginInterface
{
...
// some override functions from MyPluginInterface
void ExampleFunction() override;
...
}
void PluginGraph::addPluginCallback (std::unique_ptr<AudioPluginInstance> instance,
const String& error,
Point<double> pos,
PluginDescriptionAndPreference::UseARA useARA)
{
...
MyPluginInterface* my_interface = dynamic_cast<MyPluginInterface*>( instance.get() );
my_interface->ExampleFunction();
...
}
I tried to cast the instance to my interface but realised it was not my plugin’s instance.
I’m trying to implement some unique functionalities that are only available between my plugin and host that are not part of VST3 or AU standards.
