I am writing a VST3 plugin that hosts a VST2 plugin and need to call the dispatcher.
class MyPluginAudioProcessor : public juce::AudioProcessor, public juce::AudioProcessorListener
{
…
std::unique_ptr <juce::AudioPluginInstance> vst2plugin;
}
I get an compiler error:
*Cannot use dynamic_cast to convert from 'std::unique_ptr<juce::AudioPluginInstance>’ to 'juce::AudioPluginInstance ’
void MyPluginAudioProcessor::foo()
{
auto* XXX= dynamic_cast<juce::AudioPluginInstance*>(this.vst2plugin);
juce::VSTPluginFormat::dispatcher(XXX, 0, 0, 0, nullptr, 0);
}