Hello warm comunity
PluginProcessor.h:
class TestProcessor : public juce::AudioProcessor
{
public:
....
void setInMixState(bool newState);
bool getInMixState() const;
void updateFilters();
private:
//==============================================================================
bool warmButtonState = false;
bool inMixState = true;
juce::dsp::ProcessorChain<juce::dsp::IIR::Filter<float>, juce::dsp::IIR::Filter<float>,
juce::dsp::IIR::Filter<float>, juce::dsp::IIR::Filter<float>> filterChain;
juce::AudioProcessorValueTreeState parameters;
std::atomic<float>* hfFreq;
...
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TestProcessor)
};
PluginProcessor.cpp:
TestProcessor::TestProcessor()
#ifndef JucePlugin_PreferredChannelConfigurations
: AudioProcessor (BusesProperties()
#if ! JucePlugin_IsMidiEffect
#if ! JucePlugin_IsSynth
.withInput ("Input", juce::AudioChannelSet::stereo(), true)
#endif
.withOutput ("Output", juce::AudioChannelSet::stereo(), true)
#endif
),
parameters(*this, nullptr, juce::Identifier("TestParameters"),
{
std::make_unique<juce::AudioParameterFloat>("HF_FREQ", "HF Frequency", 1500.0f, 16000.0f, 8750.0f),
...
)})
{
hfFreq = parameters.getRawParameterValue("HF_FREQ");
updateFilters();
}
#endif
Compile…successed but…
I suspect that I don’t fully understand how this should be written correctly. I would be very grateful for the clarification and really appreciate any correction of the mistake.
To avoid wasting anyone’s time, I did some debugging of my code and found that when I add a line, everything breaks.
std::make_unique<juce::AudioParameterFloat>("HF_FREQ", "HF Frequency", 1500.0f, 16000.0f, 8750.0f),

