JuceAudioPlugin - bug?


#1

I’m currently tackling a scary bug in one of my plugins, but that’s not of your concern!

One thing I discovered, however, is that setParameterNotifyingHost (…) always results in two calls to setParameter (…). In my version i’ve commented out the call to setParameter, but will this cause a problem?


#2

good point - it looks like the VST always calls setParameter, so probably best to change it to this:

void AudioFilterBase::setParameterNotifyingHost (const int parameterIndex, 
                                                 const float newValue)
{
    if (callbacks != 0)
        callbacks->informHostOfParameterChange (parameterIndex, newValue);
    else
        setParameter (parameterIndex, newValue);
}

and assume that the informHostOfParameterChange() method will always make the setParameter() callback.


#3

Kind of an old topic, I know… but it seems that setParameter is still called two times, one time in SetParameterNotifyingHost and one time in AudioEffect::SetParameterAutomated. So it should be safe to remove the call in SetParameterNotifyingHost, shouldn’t it?


#4

.yes, I think so… Though can’t help thinking there was a reason for it being there.


#5