Safety of ValueTree inside processBlock()

Is it safe to retrieve properties from a ValueTree inside AudioProcessor’s processBlock function and use them during the process?
Should I use a lock?

ValueTree is definitely not thread-safe, you’d need to use locking.

Good to know, thank you.

…and I should also say that I strongly recommend NOT using it in realtime code. Its operations can block unpredictably.

So what would be the best way? All the informations I need are stored into ValueTrees…
Should I use variables to store the infos, updating them with ValueTree::Listener?

I did a similar thing before (had multiple issues when using a ValueTree in the audio thread) so I used a local set of atomics which I set in the value tree callback and used these in the audio callbacks. May not be the most efficient way of storing variable but it worked.

Give each thread it’s own copy of the data and use a thread queue to propagate changes.