Version | 1.18.9 |
---|
Generic time-stamped events.
See http://lv2plug.in/ns/ext/event for details.
Data Structures | |
struct | LV2_Event |
struct | LV2_Event_Buffer |
struct | LV2_Event_Feature |
Macros | |
#define | LV2_EVENT_URI "http://lv2plug.in/ns/ext/event" |
#define | LV2_EVENT_PREFIX LV2_EVENT_URI "#" |
#define | LV2_EVENT__Event LV2_EVENT_PREFIX "Event" |
#define | LV2_EVENT__EventPort LV2_EVENT_PREFIX "EventPort" |
#define | LV2_EVENT__FrameStamp LV2_EVENT_PREFIX "FrameStamp" |
#define | LV2_EVENT__TimeStamp LV2_EVENT_PREFIX "TimeStamp" |
#define | LV2_EVENT__generatesTimeStamp LV2_EVENT_PREFIX "generatesTimeStamp" |
#define | LV2_EVENT__generic LV2_EVENT_PREFIX "generic" |
#define | LV2_EVENT__inheritsEvent LV2_EVENT_PREFIX "inheritsEvent" |
#define | LV2_EVENT__inheritsTimeStamp LV2_EVENT_PREFIX "inheritsTimeStamp" |
#define | LV2_EVENT__supportsEvent LV2_EVENT_PREFIX "supportsEvent" |
#define | LV2_EVENT__supportsTimeStamp LV2_EVENT_PREFIX "supportsTimeStamp" |
#define | LV2_EVENT_AUDIO_STAMP 0 |
Variables | |
LV2_DEPRECATED typedef void * | LV2_Event_Callback_Data |
static LV2_DEPRECATED const uint32_t | LV2_EVENT_PPQN = 3136573440U |
struct LV2_Event |
An LV2 event (header only).
LV2 events are generic time-stamped containers for any type of event. The type field defines the format of a given event's contents.
This struct defines the header of an LV2 event. An LV2 event is a single chunk of POD (plain old data), usually contained in a flat buffer (see LV2_EventBuffer below). Unless a required feature says otherwise, hosts may assume a deep copy of an LV2 event can be created safely using a simple:
memcpy(ev_copy, ev, sizeof(LV2_Event) + ev->size); (or equivalent)
struct LV2_Event_Buffer |
A buffer of LV2 events (header only).
Like events (which this contains) an event buffer is a single chunk of POD: the entire buffer (including contents) can be copied with a single memcpy. The first contained event begins sizeof(LV2_EventBuffer) bytes after the start of this struct.
After this header, the buffer contains an event header (defined by struct LV2_Event), followed by that event's contents (padded to 64 bits), followed by another header, etc:
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |FRAMES |SUBFRMS|TYP|LEN|DATA..DATA..PAD|FRAMES | ...
struct LV2_Event_Feature |
Non-POD events feature.
To support this feature the host must pass an LV2_Feature struct to the plugin's instantiate method with URI "http://lv2plug.in/ns/ext/event" and data pointed to an instance of this struct. Note this feature is not mandatory to support the event extension.
Data Fields | |
LV2_Event_Callback_Data | callback_data |
uint32_t(* | lv2_event_ref )(LV2_Event_Callback_Data callback_data, LV2_Event *event) |
uint32_t(* | lv2_event_unref )(LV2_Event_Callback_Data callback_data, LV2_Event *event) |
LV2_Event_Callback_Data LV2_Event_Feature::callback_data |
Opaque pointer to host data.
The plugin MUST pass this to any call to functions in this struct. Otherwise, it must not be interpreted in any way.
uint32_t(* LV2_Event_Feature::lv2_event_ref) (LV2_Event_Callback_Data callback_data, LV2_Event *event) |
Take a reference to a non-POD event.
If a plugin receives an event with type 0, it means the event is a pointer to some object in memory and not a flat sequence of bytes in the buffer. When receiving a non-POD event, the plugin already has an implicit reference to the event. If the event is stored AND passed to an output, lv2_event_ref MUST be called on that event. If the event is only stored OR passed through, this is not necessary (as the plugin already has 1 implicit reference).
callback_data | The callback_data field of this struct. |
event | An event received at an input that will not be copied to an output or stored in any way. |
PLUGINS THAT VIOLATE THESE RULES MAY CAUSE CRASHES AND MEMORY LEAKS.
uint32_t(* LV2_Event_Feature::lv2_event_unref) (LV2_Event_Callback_Data callback_data, LV2_Event *event) |
Drop a reference to a non-POD event.
If a plugin receives an event with type 0, it means the event is a pointer to some object in memory and not a flat sequence of bytes in the buffer. If the plugin does not pass the event through to an output or store it internally somehow, it MUST call this function on the event (more information on using non-POD events below).
callback_data | The callback_data field of this struct. |
event | An event received at an input that will not be copied to an output or stored in any way. |
PLUGINS THAT VIOLATE THESE RULES MAY CAUSE CRASHES AND MEMORY LEAKS.
#define LV2_EVENT_URI "http://lv2plug.in/ns/ext/event" |
#define LV2_EVENT_PREFIX LV2_EVENT_URI "#" |
#define LV2_EVENT__Event LV2_EVENT_PREFIX "Event" |
#define LV2_EVENT__EventPort LV2_EVENT_PREFIX "EventPort" |
#define LV2_EVENT__FrameStamp LV2_EVENT_PREFIX "FrameStamp" |
#define LV2_EVENT__TimeStamp LV2_EVENT_PREFIX "TimeStamp" |
#define LV2_EVENT__generatesTimeStamp LV2_EVENT_PREFIX "generatesTimeStamp" |
#define LV2_EVENT__generic LV2_EVENT_PREFIX "generic" |
#define LV2_EVENT__inheritsEvent LV2_EVENT_PREFIX "inheritsEvent" |
#define LV2_EVENT__inheritsTimeStamp LV2_EVENT_PREFIX "inheritsTimeStamp" |
#define LV2_EVENT__supportsEvent LV2_EVENT_PREFIX "supportsEvent" |
#define LV2_EVENT__supportsTimeStamp LV2_EVENT_PREFIX "supportsTimeStamp" |
#define LV2_EVENT_AUDIO_STAMP 0 |
Special timestamp type for audio frames.
LV2_DEPRECATED typedef void* LV2_Event_Callback_Data |
Opaque pointer to host data.
|
static |
The best Pulses Per Quarter Note for tempo-based uint32_t timestamps.
Equal to 2^12 * 5 * 7 * 9 * 11 * 13 * 17, which is evenly divisible by all integers from 1 through 18 inclusive, and powers of 2 up to 2^12.