I am having some problems with toggle buttons/juce::AudioParameterBool
Not sure if this is due to my error or maybe some kind of bug.
I have some bools that I would like to set via the GUI e.g.,
bool sumInputToMono = true;
Following the pattern I learned for other variables I created a juce::AudioParameter
juce::AudioParameterBool* sumInputToMonoParam;
(I am not sure whether I am really going to need a separate bool member - maybe you can advise?)
In the pluginprocessor.cpp file I added:
addParameter(sumInputToMonoParam = new juce::AudioParameterBool("monoinput", "Mono Input", sumInputToMono));
When I build this, and add a toggle button to the GUI, I can see the parameter on the dropdown list of available parameters. I can assign the parameter to the toggle button. However when I click on it I get:
this is in juce_AudioProcessor.cpp
I noticed that i) before I assign the parameter I can toggle the switch
and ii) after I assign it it doesn’t through the exception till I click and iii) I think it may even happen when I click elsewhere in the View object I created to contain the toggle.
In the long run I am hoping to use the value of the parameter directly or to use it to set a bool that will then alter the sequence of dsp steps in processBlock().