AudioProcessorListener thread (solved)

I am wrapping plugin inside my plugin and listening to its changes using AudioProcessorListener. As expected, listener is automatically running in the same thread as wrapped plugin (including called methods like setParameterNotifyingHost etc.).

Some plugin format (like VST3) requires that setParameterNotifyingHost() is called from main thread to be accepted. I adapted my code, so i am calling setParameterNotifyingHost() and other methods from main thread using callFunctionOnMessageThread() method. It works as expected with VST3, but it doesn’t work with AAX (crash - class not registered). I can do it only for VST3, but …

i am thinking if maybe is possible to run listener in main thread, despite it is listening to wrapped plugin, which runs in another thread.

Any ideas how to do it - if it’s possible at all??

EDIT: callFunctionOnMessageThread() is working with AAX as well, if used properly - it crashed because of my bug.