Is IComponent::getState()/setState() thread-safe?

Allows to develop VST 3 Audio Plug-ins and VST 3 host.
abique
Posts: 20
Joined: Tue Jun 21, 2016 12:43 pm

Is IComponent::getState()/setState() thread-safe?

Postby abique » Mon Feb 12, 2018 11:49 am

Hi,

In Bitwig Studio we use IComponent::getState() from the GUI thread.
But I cam across a crash where IComponent::getState() was concurrent to a program change executed on the Audio thread.

So please, could you guys clarify if getState() and setState() are thread-safe?

Also in general I think that the documentation could be made more clear regarding the threading model and which thread can call which method.

Many thanks,
Alex

ygrabit
Posts: 78
Joined: Fri Jun 17, 2016 7:52 am
Location: Hamburg

Re: Is IComponent::getState()/setState() thread-safe?

Postby ygrabit » Mon Feb 12, 2018 4:01 pm

Hi
there is in the SDK documention a workflow diagram "Audio Processor Call Sequence", setState and getState are called normally from the UI Thread when the plugin is used in a realtime context, in an offline context set/getState could be called in the same thread than the process call.

We will add some more explanation in the SDK doc.

Cheers
YVan Grabit

abique
Posts: 20
Joined: Tue Jun 21, 2016 12:43 pm

Re: Is IComponent::getState()/setState() thread-safe?

Postby abique » Tue Feb 13, 2018 1:27 pm

Thank you very much! :)


Return to “VST 3 SDK”

Who is online

Users browsing this forum: No registered users and 4 guests