AudioProcessorParameter setValue should be private IMO

If I’m not mistaken nothing other than the AudioProcessor should call setValue() on an AudioProcessorParameter, yet the method is public, and the AudioProcessor is a friend class. I realise there might be argument for moving the call to setValue() into the wrappers themselves but I think they are better accessing this via the AudioProcessor and at some point in the distant future the virtual keyword could be dropped from the setParameter() method. Anyway it seems to me the setValue() method should be private to prevent anyone from accidentally calling it instead of setValueNotifyingHost().

1 Like

As I understand it it’s the host that calls setValue() as result of receiving a setValueNotifyingHost(), automation or controller action… that’s why it cannot be private.
But you are right to worry somebody could call that by mistake…

EDIT: now I see what you mean, the host will probably not use AudioProcessorParameter::setValue() but rather the old-style AudioProcessor::setParameter(), so yes, it doesn’t need to be public… my bad…

2 Likes