commit 08c660954a5ade17b1e12e9be41a4073860b1f77
parent 073eb7b02d6859b9ba750e2e5f10ee0be47a07d7
Author: Alexandre BIQUE <bique.alexandre@gmail.com>
Date: Thu, 23 Dec 2021 11:39:10 +0100
Add a flag to clap_event to indicate if an event is live
Fixes #26
Diffstat:
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/include/clap/events.h b/include/clap/events.h
@@ -27,6 +27,12 @@ enum {
};
typedef int32_t clap_event_type;
+enum {
+ // Should be true if the events is external to the host, like a live user input
+ CLAP_EVENT_IS_LIVE = 1 << 0,
+};
+typedef int32_t clap_event_flags;
+
/**
* Note on, off, end and choke events.
* In the case of note choke or end events:
@@ -173,7 +179,8 @@ typedef struct clap_event_midi_sysex {
typedef struct clap_event {
alignas(4) clap_event_type type;
- alignas(4) uint32_t time; // offset from the first sample in the process block
+ alignas(4) uint32_t time; // offset from the first sample in the process block
+ alignas(4) clap_event_flags flags;
union {
clap_event_note_t note;