Cleanup
[carla.git] / source / includes / clap / ext / timer-support.h
blob3bbf267c04d662c5bc13258e79b3e1956006a92e
1 #pragma once
3 #include "../plugin.h"
5 static CLAP_CONSTEXPR const char CLAP_EXT_TIMER_SUPPORT[] = "clap.timer-support";
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
11 typedef struct clap_plugin_timer_support {
12 // [main-thread]
13 void (CLAP_ABI *on_timer)(const clap_plugin_t *plugin, clap_id timer_id);
14 } clap_plugin_timer_support_t;
16 typedef struct clap_host_timer_support {
17 // Registers a periodic timer.
18 // The host may adjust the period if it is under a certain threshold.
19 // 30 Hz should be allowed.
20 // [main-thread]
21 bool (CLAP_ABI *register_timer)(const clap_host_t *host, uint32_t period_ms, clap_id *timer_id);
23 // [main-thread]
24 bool (CLAP_ABI *unregister_timer)(const clap_host_t *host, clap_id timer_id);
25 } clap_host_timer_support_t;
27 #ifdef __cplusplus
29 #endif