From 3e33dfb2ee6fbf9361a66038732405c75e76c882 Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Thu, 26 Sep 2024 14:47:50 -0400 Subject: [PATCH 1/5] Add a description of the expectation of request_callback timing Without making a requirement, indicate the intent of the timing. --- include/clap/host.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/clap/host.h b/include/clap/host.h index ddfeb8e7..004df575 100644 --- a/include/clap/host.h +++ b/include/clap/host.h @@ -35,6 +35,10 @@ 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 applications next + // available main thread time slice. Typically callbacks occur at least in the 10s-to-50s-of-milliseconds + // or 30-120hz timeslice range. Plugins should not make assumptions about the exactness of timing for + // a main thread callback but hosts should endeavour to be prompt. // [thread-safe] void(CLAP_ABI *request_callback)(const struct clap_host *host); } clap_host_t; From 9e84750233fa2d731f0bac83d712ed6bf64fc5fb Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Thu, 26 Sep 2024 14:50:34 -0400 Subject: [PATCH 2/5] Add an apostrophe --- include/clap/host.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/clap/host.h b/include/clap/host.h index 004df575..93187e43 100644 --- a/include/clap/host.h +++ b/include/clap/host.h @@ -35,7 +35,7 @@ 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 applications next + // This callback should be called as soon as practicable, usually in the host application's next // available main thread time slice. Typically callbacks occur at least in the 10s-to-50s-of-milliseconds // or 30-120hz timeslice range. Plugins should not make assumptions about the exactness of timing for // a main thread callback but hosts should endeavour to be prompt. From 89e683b166e1a47875225f9c801e515157128a27 Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Fri, 27 Sep 2024 08:19:09 -0400 Subject: [PATCH 3/5] Add host can starve feedback from alex --- include/clap/host.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/clap/host.h b/include/clap/host.h index 93187e43..29a39928 100644 --- a/include/clap/host.h +++ b/include/clap/host.h @@ -38,7 +38,9 @@ typedef struct clap_host { // This callback should be called as soon as practicable, usually in the host application's next // available main thread time slice. Typically callbacks occur at least in the 10s-to-50s-of-milliseconds // or 30-120hz timeslice range. Plugins should not make assumptions about the exactness of timing for - // a main thread callback but hosts should endeavour to be prompt. + // a main thread callback but hosts should endeavour to be prompt. However in high load situations + // the host 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; From 6507fc346d2d0653849d0221545f4a7ebfedd726 Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Fri, 27 Sep 2024 09:55:43 -0400 Subject: [PATCH 4/5] more review feedback --- include/clap/host.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/clap/host.h b/include/clap/host.h index 29a39928..c232b5b8 100644 --- a/include/clap/host.h +++ b/include/clap/host.h @@ -36,9 +36,9 @@ typedef struct clap_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 at least in the 10s-to-50s-of-milliseconds - // or 30-120hz timeslice range. Plugins should not make assumptions about the exactness of timing for - // a main thread callback but hosts should endeavour to be prompt. However in high load situations + // 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 host 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] From 2536ddc88c05845dce8f0490804909dbcdd7b6b7 Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Fri, 27 Sep 2024 09:57:23 -0400 Subject: [PATCH 5/5] notjusthosts --- include/clap/host.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/clap/host.h b/include/clap/host.h index c232b5b8..c647c198 100644 --- a/include/clap/host.h +++ b/include/clap/host.h @@ -39,7 +39,7 @@ typedef struct clap_host { // 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 host may starve the gui/main thread in favor of audio processing, leading to substantially + // 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);