- I've built a ValueTree which stores my GUI state. GUI objects which update parameters change a sub-tree containing the relevant information.
- I've added a listener to the ValueTree.
- The listener calls processor.setParameterNotifyingHost(...)
- That calls setParameter(...)
- setParameter(...) makes a thread-safe call to update the audio thread.
However setParameter(...) is also called by the host. When the host calls it I need to update the GUI, and the ValueTree, which triggers this whole loop off again, notifying the host of the parameter change that it just made. Is that necesssary? I get a duplicate update call into setParameter as well.
I'm thinking that the solution is to call sendParamChangeToListeners directly and then the thread-safe audio thread update call.
Is that sensible?