prepareToPlay in vst3

Cubase 6 calls prepareToPlay 3 times.  The first time is with the uninitialized default values, then the other 2 times are valid.

Are all 3 of these necessary or could I comment out the extra preparePlugin calls (besides SetActive)in juce's code?

 

The PluginHost sample's scan might explain the two extra calls from initialise and setupProcessing.The call from setBusArrangements only happens within the Plugin Host sample as well.  I'm not sure why I don't get that one from Cubase.

 

Cubase Stack 1  (with default values)
>    Alpine.vst3!RvsplayerAudioProcessor::prepareToPlay(double sampleRate, int samplesPerBlock) Line 110    C++
     Alpine.vst3!juce::JuceVST3Component::preparePlugin(double sampleRate, int bufferSize) Line 1822    C++
     Alpine.vst3!juce::JuceVST3Component::initialize(Steinberg::FUnknown * hostContext) Line 849    C++


Cubase Stack 2  (with correct values)
>    Alpine.vst3!RvsplayerAudioProcessor::prepareToPlay(double sampleRate, int samplesPerBlock) Line 110    C++
     Alpine.vst3!juce::JuceVST3Component::preparePlugin(double sampleRate, int bufferSize) Line 1822    C++
     Alpine.vst3!juce::JuceVST3Component::setupProcessing(Steinberg::Vst::ProcessSetup & newSetup) Line 1533    C++


Cubase Stack 3
>    Alpine.vst3!RvsplayerAudioProcessor::prepareToPlay(double sampleRate, int samplesPerBlock) Line 110    C++
     Alpine.vst3!juce::JuceVST3Component::preparePlugin(double sampleRate, int bufferSize) Line 1822    C++
     Alpine.vst3!juce::JuceVST3Component::setActive(unsigned char state) Line 925    C++