Is (VST3) ParamValueQueueList implementation suitable for calls from Audio thread

This is actually a question for a plugin host (not plugin) implementation.

I noticed that the juce::VST3PluginInstance::ParamValueQueueList acquires a lock(criticalsection actually) for getParameterCount and getParameterData functions - which may be called from the Audio Processing Thread.

This could be risky, because the same lock is also used from addParameterData - which is called from non-Audio thread - most likely running at a lower priority.

Effectively, the audio thread may have to wait for the non-audio thread to do it’s work (addParameterData - which also includes memory allocation).

This does not sound right.

Am I missing something here?

It sounds like you’re using an old version of JUCE. The ParamValueQueueList is not present on the develop branch.

The latest VST3 implementation in JUCE should be much more conformant to the VST3 spec, and more realtime-safe than the version in JUCE 6.

Indeed - I was looking at JUCE 6.

Thank you so much! I’ll move to latest version.