Skip to content

Commit

Permalink
Add a description of the expectation of request_callback timing (#422)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
baconpaul authored and abique committed Nov 18, 2024
1 parent 27f20f8 commit 0473fa2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/clap/host.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ typedef struct clap_host {
void(CLAP_ABI *request_process)(const struct clap_host *host);

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

0 comments on commit 0473fa2

Please sign in to comment.