I could use a little help with a bug I’m experiencing with an RTAS plug that uses Juce sliders. When a slider value changes, my filter’s SetParameter() function is called twice, first when my UI component is called and subsequently calls getFilter()->setParameterNotifyingHost() from sliderValueChanged(), and then from UpdateControlValue() via the Pro Tools process classes. I’m surprised to see the second call happen, but regardless, here’s what goes wrong. The first call to SetParameter has the correct values, and for my app they are normally 0 to 1000. However any values over 1 result in the second call to SetParameter() getting passed a value of 0x7FFFFFFF. The call stack shows that the bad value is there as early as PI_UpdateControlValue which is called from the Pro Tools lib. In JucePlugInProcess::UpdateControlValue, the call to longToFloat() converts it to a 1.
Anybody care to take a guess as to what’s going on here? I’ll keep digging but if this is obvious to anyone, please send me a note.