I’m currently working on a large project in which I need a slightly different setup than
AudioProcessorValueTreeState offers, I am therefore attempting to write my own interface for automation to internal state. I am however unclear on the following:
/** 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. */ virtual void parameterValueChanged (int parameterIndex, float newValue)
this will be called synchronously when a parameter changes, and many audio processors will change their parameter during their audio callback
This raises some questions for me:
- Is it garuanteed that this function will only be called during the audio callback in every DAW or is the danger in the word
- If it is garuanteed, does this happen before / after
- Or should I not make any assumptions as usual?
- My last question is about
setValueNotifyingHost, Does this function guarantuee safe behaviour when being called from non-JUCE threads or should it be called from a certain place?