**This approach worked fine for my previous project, but now, I’m getting an error: 'Cannot initialize a parameter of type 'juce::AudioProcessorValueTreeState::Listener ’ with an rvalue of type 'DemoAudioProcessor ‘.’
//PluginProcessor.h
AudioProcessorValueTreeState parameters;
//PluginProcessor.cpp
DemoAudioProcessor::DemoAudioProcessor()
: AudioProcessor(BusesProperties()
.withInput("Input", juce::AudioChannelSet::stereo(), true)
.withOutput("Output", juce::AudioChannelSet::stereo(), true)),
parameters(*this, nullptr, “Demo”, juce::AudioProcessorValueTreeState::ParameterLayout{
std::make_unique<juce::AudioParameterFloat>("gain", "Gain", -60.f, 12.f, 0.f),
})
{
parameters.addParameterListener("gain", this); // error: 'Cannot initialize a parameter of type 'juce::AudioProcessorValueTreeState::Listener *' with an rvalue of type 'DemoAudioProcessor *'.'
}
What am I missing? I would appreciate it if anybody could point me in the right direction.