Clarification about IComponent::setState and IComponent::getState

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

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.

Thank you for the clarification :slight_smile:

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

Yan