Clarification about IComponent::setState and IComponent::getState

SDK for VST 3 audio plug-in and host development.
Post Reply
abique
Posts: 42
Joined: Tue Jun 21, 2016 12:43 pm

Clarification about IComponent::setState and IComponent::getState

Post by abique »

Hi,

From which thread should IComponent::setState() and IComponent::getState() be called?

Can those methods be called from the main thread while the component is processing audio?

Many thanks,
Alex

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

Re: Clarification about IComponent::setState and IComponent::getState

Post by ygrabit »

setState and getState are called in the UI Thread.
Note that the process call in the Audio Thread is still called during changing state (setState), the plugin has to take care about this.... One possibility is to keep the new state in a struct and apply it to the processor model in the next process call.
YVan Grabit

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

Re: Clarification about IComponent::setState and IComponent::getState

Post by abique »

Thank you for the clarification :-)

User avatar
pongasoft
Posts: 99
Joined: Sun Mar 11, 2018 5:57 pm
Location: Las Vegas, USA
Contact:

Re: Clarification about IComponent::setState and IComponent::getState

Post by pongasoft »

@abique: you may also want to check this thread viewtopic.php?t=516 in which I ran some experiments and provided a potential solution...

Yan

Post Reply