AudioProcessor::setParameterNotifyingHost threading


Why can’t we set parameters on threads different then the MessageThread (i do that from the MIDI Input thread for example). I had no problems so far. Do i need to change this ?

void AudioProcessor::setParameterNotifyingHost (const int parameterIndex,
                                                 const float newValue)
+    jassert (MessageManager::getInstance()->isThisTheMessageThread());
     setParameter (parameterIndex, newValue);
     sendParamChangeMessageToListeners (parameterIndex, newValue);


I think it was because of this:


Does this mean that when the host calls setParametef on my AudioProcessor, i’m sure it will be on the MessageThread ?

I always thought that parameter changes happened on the audio thread.


I think i answered that question myself by reading some forums (for example the reaper forum

It looks like setParameter can be called from a different thread, both different then the Audio and the Message thread, shouldn’t there be an assertion in that too ? If we want to be consistent about
threads. I can imagine the same thing applies to parameter names and value formatting.