Skip to content

Commit d0f0373

Browse files
authored
Add a description of the expectation of request_callback timing (#422)
* Add a description of the expectation of request_callback timing Without making a requirement, indicate the intent of the timing. * Add an apostrophe * Add host can starve feedback from alex * more review feedback * notjusthosts
1 parent 961be0b commit d0f0373

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

include/clap/host.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ typedef struct clap_host {
3535
void(CLAP_ABI *request_process)(const struct clap_host *host);
3636

3737
// Request the host to schedule a call to plugin->on_main_thread(plugin) on the main thread.
38+
// This callback should be called as soon as practicable, usually in the host application's next
39+
// available main thread time slice. Typically callbacks occur withink 33ms / 30hz.
40+
// Despite this guidance, plugins should not make assumptions about the exactness of timing for
41+
// a main thread callback, but hosts should endeavour to be prompt. For example, in high load situations
42+
// the environment may starve the gui/main thread in favor of audio processing, leading to substantially
43+
// longer latencies for the callback than the indicative times given here.
3844
// [thread-safe]
3945
void(CLAP_ABI *request_callback)(const struct clap_host *host);
4046
} clap_host_t;

0 commit comments

Comments
 (0)