I'm trying to create a VST plug-in using JUCE framework but I've been having this error: JUCE Message Thread (1): EXC_BREAKPOINT (code=1, subcode=0x102e61424. This error comes up in correlation with red underlined "Jassertfalse".
Until then written Code:
juce::AudioProcessorValueTreeState::ParameterLayout SimpleEQAudioProcessor::createParameterLayout()
{
juce::AudioProcessorValueTreeState::ParameterLayout layout;
layout.add(std::make_unique<juce::AudioParameterFloat>("LowCut Freq",
"LowCut Freq",
juce::NormalisableRange<float>(20.f, 20000.f, 1.f, 1.f),20.f));
layout.add(std::make_unique<juce::AudioParameterFloat>("HighCut Freq",
"Highcut Freq",
juce::NormalisableRange<float>(20.f, 20000.f, 1.f, 1.f), 20000.f));
layout.add(std::make_unique<juce::AudioParameterFloat>("Peak Freq",
"Peak Freq",
juce::NormalisableRange<float>(20.f, 20000.f, 1.f, 1.f), 750.f));
layout.add(std::make_unique<juce::AudioParameterFloat>("Peak Gain",
"Peak Gain",
juce::NormalisableRange<float>(-24.f, 24.f, 0.5f, 1.f), 0.0f));
layout.add(std::make_unique<juce::AudioParameterFloat>("Peak Quality",
"Peak Quality",
juce::NormalisableRange<float>(0.1f, 10.f, 0.05f, 1.f), 1.f));
juce::StringArray stringArray;
for( int i = 0; i <4; ++i)
{
juce::String str;
str << (12 + i*12);
str << " db/Oct";
stringArray.add(str);
}
layout.add(std::make_unique<juce::AudioParameterChoice>("LowCut Slope", "LowCut Slope", stringArray, 0));
layout.add(std::make_unique<juce::AudioParameterChoice>("HighCut Slope", "HighCut Slope", stringArray, 0));
return layout;
}
As you can read in the the official documentation of the JUCE framework, when adding parameters you have to enclose the IDs in a way similar to this:
juce::ParameterID(param, 1).Therefore, your code becomes this: