diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/DPF-Prymula-audioplugins/dpf/distrho/src/clap/ext/timer-support.h	Mon Oct 16 21:53:34 2023 +0200
@@ -0,0 +1,29 @@
+#pragma once
+
+#include "../plugin.h"
+
+static CLAP_CONSTEXPR const char CLAP_EXT_TIMER_SUPPORT[] = "clap.timer-support";
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct clap_plugin_timer_support {
+   // [main-thread]
+   void(CLAP_ABI *on_timer)(const clap_plugin_t *plugin, clap_id timer_id);
+} clap_plugin_timer_support_t;
+
+typedef struct clap_host_timer_support {
+   // Registers a periodic timer.
+   // The host may adjust the period if it is under a certain threshold.
+   // 30 Hz should be allowed.
+   // [main-thread]
+   bool(CLAP_ABI *register_timer)(const clap_host_t *host, uint32_t period_ms, clap_id *timer_id);
+
+   // [main-thread]
+   bool(CLAP_ABI *unregister_timer)(const clap_host_t *host, clap_id timer_id);
+} clap_host_timer_support_t;
+
+#ifdef __cplusplus
+}
+#endif