comparison DPF-Prymula-audioplugins/dpf/distrho/src/clap/ext/timer-support.h @ 3:84e66ea83026

DPF-Prymula-audioplugins-0.231015-2
author prymula <prymula76@outlook.com>
date Mon, 16 Oct 2023 21:53:34 +0200
parents
children
comparison
equal deleted inserted replaced
2:cf2cb71d31dd 3:84e66ea83026
1 #pragma once
2
3 #include "../plugin.h"
4
5 static CLAP_CONSTEXPR const char CLAP_EXT_TIMER_SUPPORT[] = "clap.timer-support";
6
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10
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;
15
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);
22
23 // [main-thread]
24 bool(CLAP_ABI *unregister_timer)(const clap_host_t *host, clap_id timer_id);
25 } clap_host_timer_support_t;
26
27 #ifdef __cplusplus
28 }
29 #endif