commit 965a5cbb871f56b56684e9f476d94e0a4f0ee3a3
parent 50e7ae2cb19042b7bc3b6563513749836a89c78e
Author: Alexandre Bique <bique.alexandre@gmail.com>
Date: Wed, 25 May 2022 14:36:41 +0200
Move event filter back to draft
Diffstat:
3 files changed, 42 insertions(+), 35 deletions(-)
diff --git a/include/clap/clap.h b/include/clap/clap.h
@@ -46,7 +46,6 @@
#include "ext/posix-fd-support.h"
#include "ext/note-name.h"
#include "ext/note-ports.h"
-#include "ext/event-filter.h"
#include "ext/thread-pool.h"
#include "ext/event-registry.h"
#include "ext/tail.h"
@@ -61,6 +60,7 @@
#include "ext/draft/cv.h"
#include "ext/draft/ambisonic.h"
#include "ext/draft/voice-info.h"
+#include "ext/draft/event-filter.h"
#include "converters/vst2-converter.h"
#include "converters/vst3-converter.h"
diff --git a/include/clap/ext/draft/event-filter.h b/include/clap/ext/draft/event-filter.h
@@ -0,0 +1,41 @@
+#pragma once
+
+#include "../../plugin.h"
+
+static CLAP_CONSTEXPR const char CLAP_EXT_EVENT_FILTER[] = "clap.event-filter/draft";
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// This extension lets the host know which event types the plugin is interested
+// in. The purpose is to reduce the number of events in the stream and not to
+// infer plugin's capabilities from it.
+//
+// This extension is currently in draft because we are not sure which aproach is best: whitelist vs
+// blacklist and how much impact it has over the number of events. When a plugin supports polyphonic
+// modulations, then the event queue can grow massively and this extension would then become
+// irrelevant.
+//
+// The host will cache the set of accepted events before activating the plugin.
+// The set of accepted events can't change while the plugin is active.
+//
+// If this extension is not provided by the plugin, then all events are accepted.
+//
+// If CLAP_EVENT_TRANSPORT is not accepted, then clap_process.transport may be null.
+typedef struct clap_plugin_event_filter {
+ // Returns true if the plugin is interested in the given event type.
+ // [main-thread]
+ bool (*accepts)(const clap_plugin_t *plugin, uint16_t space_id, uint16_t event_type);
+} clap_plugin_event_filter_t;
+
+typedef struct clap_host_event_filter {
+ // Informs the host that the set of accepted event type changed.
+ // This requires the plugin to be deactivated.
+ // [main-thread]
+ void (*changed)(const clap_host_t *host);
+} clap_host_event_filter_t;
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/include/clap/ext/event-filter.h b/include/clap/ext/event-filter.h
@@ -1,34 +0,0 @@
-#pragma once
-
-#include "../plugin.h"
-
-static CLAP_CONSTEXPR const char CLAP_EXT_EVENT_FILTER[] = "clap.event-filter";
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// This extension lets the host know which event types the plugin is interested
-// in.
-// The host will cache the set of accepted events before activating the plugin.
-// The set of accepted events can't change while the plugin is active.
-//
-// If this extension is not provided by the plugin, then all events are accepted.
-//
-// If CLAP_EVENT_TRANSPORT is not accepted, then clap_process.transport may be null.
-typedef struct clap_plugin_event_filter {
- // Returns true if the plugin is interested in the given event type.
- // [main-thread]
- bool (*accepts)(const clap_plugin_t *plugin, uint16_t space_id, uint16_t event_type);
-} clap_plugin_event_filter_t;
-
-typedef struct clap_host_event_filter {
- // Informs the host that the set of accepted event type changed.
- // This requires the plugin to be deactivated.
- // [main-thread]
- void (*changed)(const clap_host_t *host);
-} clap_host_event_filter_t;
-
-#ifdef __cplusplus
-}
-#endif