You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that clap_audio_buffer has a field called latency, which indicates "latency from/to the audio interface". Since clap_audio_buffer is only used in clap_process, which is only accessed on the audio thread while the plugin is processing, I can say that latency is only accessed directly from the audio thread.
The question is that I cannot figure out how the audio thread utilizes this info.
As a reference: in VST3 plugin API, the plugin accesses the similar latency info by implementing the IAudioPresentationLatency interface, which is used on the UI thread. From what I understood, the plugin can synchronize the UI elements with the audio stream passing through with this interface. If I'd like to make a plugin that does the same thing with CLAP, the latency info can only be read on the audio thread, thus has to be passed to the UI thread manually, which is quite an inconvenience.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I noticed that
clap_audio_buffer
has a field calledlatency
, which indicates "latency from/to the audio interface". Sinceclap_audio_buffer
is only used inclap_process
, which is only accessed on the audio thread while the plugin is processing, I can say thatlatency
is only accessed directly from the audio thread.The question is that I cannot figure out how the audio thread utilizes this info.
As a reference: in VST3 plugin API, the plugin accesses the similar latency info by implementing the
IAudioPresentationLatency
interface, which is used on the UI thread. From what I understood, the plugin can synchronize the UI elements with the audio stream passing through with this interface. If I'd like to make a plugin that does the same thing with CLAP, the latency info can only be read on the audio thread, thus has to be passed to the UI thread manually, which is quite an inconvenience.Beta Was this translation helpful? Give feedback.
All reactions