Edit: I think this is a bug, see the answer below
I have a weird issue that I can’t quite track down. My hope is that someone around here can provide me with some advice on how to move on.
I have an
AudioProcessor that is registered as a listener on its
AudioProcessorValueTreeState. I want to modify some parameter value from the GUI and get a callback in the AudioProcessor.
In the GUI, I have a collection of buttons that modify a
Value and set it to specific values when pressed. I connect this value to the AudioProcessorValueTreeState like this:
auto& myValue = treeState.getParameterAsValue("myParameterIDString"); myButtonCollection.getSelectionAsValue().referTo(myValue);
When I press one of the buttons, I can track that the underlying
Value changes. In fact, as it now refers to data in the
AudioProcessorValueTreeState, I can actually see
ValueTreePropertyValueSource::setValue() being called. What is weird is that my plugin processor doesn’t receive a call to
parameterChanged() when it runs in certain hosts (other hosts or the standalone version work fine). I stepped through the code with the debugger in various ways, but there is so many callbacks happening in result to the call to
ValueTreePropertyValueSource::setValue() that it is almost impossible to find out where the call to my
AudioProcessor gets lost.
What I do know is that, when the callback arrives, it arrives as a consequence to a call to
AudioProcessorValueTreeState::valueTreePropertyChanged. This call doesn’t happen when I test it in the problematic host, so my callback gets lost somewhere before that.
Now I’m wondering what strategy I can use to narrow this down, especially since it only happens in a certain host. I would be grateful for any hints.
Additional Info: JUCE 5.4.3