I keep getting a jassert for checkForDuplicateParamID
when compiling.
I followed this tutorial on building a preset manager.
All my parameters are declared in a Parameters.h file like this:
#pragma once
#include <JuceHeader.h>
const juce::ParameterID gainParamID { "gain", 1 };
class Parameters
{
public:
Parameters(juce::AudioProcessorValueTreeState& apvts);
static juce::AudioProcessorValueTreeState::ParameterLayout createParameterLayout();
private:
juce::AudioParameterFloat* gainParam;
//==============================================================================
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Parameters)
};
So the version hint is definitely in there. I don't have any errors. My JUCE project (in projucer) is set to version "1".
It's implemented like this:
layout.add(std::make_unique<juce::AudioParameterFloat>(
gainParamID,
"Output Gain",
juce::NormalisableRange<float> { -12.0f, 12.0f },
0.0f,
juce::AudioParameterFloatAttributes().withStringFromValueFunction(stringFromDecibels)));
Adding in {"Output Gain", 1}
after gainParamID
throws an error (" Expected ')'
"). The documentation says it's only in DEBUG mode, but I'd like to clear up this error before release.
Any ideas on how to resolve this? I much appreciate any input.