Ok, apologies… I copied the code from an AudioProcessorValueTreeState parameter, which works in floats. It can be easily changed:
slider.valueFromTextFunction = [](String text)
{
return Decibels::decibelsToGain (text.dropLastCharacters (3).getDoubleValue());
};
slider.textFromValueFunction = [](double value)
{
return String (Decibels::gainToDecibels(value), 1) + " dB";
};
I didn’t use the popup component though, so I can’t comment on that. I would have expected it uses the lambdas as well…