I am running into a problem with my copy protection code, where my copy protection function seems to be called once for Audio Units, but 3 times for VSTs. I have found that I can reproduce the issue with the Juce Demo Plugin.
Here’s how to reproduce the bug:
- In the constructor function for the GUI (PluginEditor.cpp, JuceDemoPluginAudioProcessorEditor::JuceDemoPluginAudioProcessorEditor) add the following code:
"Let's see how often this is called.",
So, why would this be called once for an Audio Unit, but 3 times for a VST?
Also, is the constructor of the GUI the best place for my copy protection function to be called from? The plugin constructor itself results in my copy protection being called when the host starts up, which is annoying. I tried putting it in prepareForPlay(), which works for Audio Units, but causes VSTs to hang the host.
Thanks for the help,