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 Sep 30, 2024
1 parent 961be0b commit d0f0373
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/clap/host.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ 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 withink 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 d0f0373

Please sign in to comment.