Page 1 of 1

Clarification about IComponent::setState and IComponent::getState

Posted: Wed Apr 10, 2019 2:43 pm
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

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

Posted: Thu Apr 11, 2019 7:16 am
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.

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

Posted: Fri Apr 12, 2019 7:37 am
by abique
Thank you for the clarification :-)

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

Posted: Fri Apr 12, 2019 1:06 pm
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