According to the documentation of parameterValueChanged()
:
Receives a callback when a parameter has been changed.
IMPORTANT NOTE: This will be called synchronously when a parameter changes, and many audio processors will change their parameter during their audio callback. This means that not only has your handler code got to be completely thread-safe, but it’s also got to be VERY fast, and avoid blocking. If you need to handle this event on your message thread, use this callback to trigger an AsyncUpdater or ChangeBroadcaster which you can respond to on the message thread.
I am not sure about the meaning of audio callback here. If parameterValueChanged()
is called from the audio thread, should I ensure the handler is real-time safe: no system call, no allocation/deallocation, etc?