I can’t think of why I would ever update a parameter from a thread. My audio thread only ever reads parameter values. Parameter values are only ever changed from UI interactions.
I guess if I implemented midi learn or something like that, they would cause parameter changes from the audio thread.
daniel
November 12, 2016, 8:06pm
22
It’s not necessarily you, it might be the host, so see this thread:
Hi everyone,
I just spent the last 4 hours hunting an extremely non-deterministic memory corruption bug in my plugin. The root cause was that Pro Tools 12 will call setParameter on an automation thread while processBlock is called on one of their audio processing threads, which in my case lead to memory corruption inside the parameter class.
The resolution is super easy: Make sure you lock the callback lock in setParameter, e.g.:
const ScopedLock sl (getCallbackLock());
…mind that the discussion continues, the solution of the first post using locking is not recommended…
t0m
November 14, 2016, 12:44pm
23
I’ve just pushed a fix for this to develop.
Thanks, those changes look pretty invasive. I’ll test this soon.
GMH
March 25, 2017, 7:21pm
25
Have there been any updates on this matter? I’m running into the same issue using Reaper.
EDIT: I updated to the latest version of juce and no long have this issue