I am trying to build a plugin project in projucer, using juce as a submodule.
Initially the project was set to build vst3, but I want it as standalone, so I changed project settings in projucer to include standalone as plugin format.
Now, I am getting the exception thrown when trying to build the project, which mentions
JUCE Assertion failure in juce_AudioProcessorValueTreeState.cpp:315
I did some searching, and found the related topic,
As discussed here, I added treeState.state = ValueTree("MyPlugin"); explicitly.
But still running into same exception,
and one thing to mention, I get this exception, only when building in standalone, vst3 builds successfully.
Make sure this is done after all parameters are added. That’s what this jassert and the comment next to it is trying to tell you.
Also make sure to pick the right constructor for AudioProcessorValueTreeState.
If you want to add parameters in the AudioProcessor’s body, don’t use the constructor that gives the state a name and a ParameterLayout.
@daniel Thank you !
Just to confirm, if I go with second option, I do not need to add parameters using
createAndAddParameter() in the MyProcessor() {} constructor…?