ardour
|
#include <stdint.h>
#include <stdbool.h>
Go to the source code of this file.
Classes | |
struct | LV2_Evbuf_Iterator |
Typedefs | |
typedef struct LV2_Evbuf_Impl | LV2_Evbuf |
Enumerations | |
enum | LV2_Evbuf_Type { LV2_EVBUF_EVENT, LV2_EVBUF_ATOM } |
Functions | |
LV2_Evbuf * | lv2_evbuf_new (uint32_t capacity, LV2_Evbuf_Type type, uint32_t atom_Chunk, uint32_t atom_Sequence) |
void | lv2_evbuf_free (LV2_Evbuf *evbuf) |
void | lv2_evbuf_set_type (LV2_Evbuf *evbuf, LV2_Evbuf_Type type) |
void | lv2_evbuf_reset (LV2_Evbuf *evbuf, bool input) |
uint32_t | lv2_evbuf_get_size (LV2_Evbuf *evbuf) |
uint32_t | lv2_evbuf_get_capacity (LV2_Evbuf *evbuf) |
void * | lv2_evbuf_get_buffer (LV2_Evbuf *evbuf) |
LV2_Evbuf_Iterator | lv2_evbuf_begin (LV2_Evbuf *evbuf) |
LV2_Evbuf_Iterator | lv2_evbuf_end (LV2_Evbuf *evbuf) |
bool | lv2_evbuf_is_valid (LV2_Evbuf_Iterator iter) |
LV2_Evbuf_Iterator | lv2_evbuf_next (LV2_Evbuf_Iterator iter) |
bool | lv2_evbuf_get (LV2_Evbuf_Iterator iter, uint32_t *frames, uint32_t *subframes, uint32_t *type, uint32_t *size, uint8_t **data) |
bool | lv2_evbuf_write (LV2_Evbuf_Iterator *iter, uint32_t frames, uint32_t subframes, uint32_t type, uint32_t size, const uint8_t *data) |
typedef struct LV2_Evbuf_Impl LV2_Evbuf |
An abstract/opaque LV2 event buffer.
Definition at line 46 of file lv2_evbuf.h.
enum LV2_Evbuf_Type |
Format of actual buffer.
Enumerator | |
---|---|
LV2_EVBUF_EVENT |
An (old) ev:EventBuffer (LV2_Event_Buffer). |
LV2_EVBUF_ATOM |
A (new) atom:Sequence (LV2_Atom_Sequence). |
Definition at line 31 of file lv2_evbuf.h.
LV2_Evbuf_Iterator lv2_evbuf_begin | ( | LV2_Evbuf * | evbuf | ) |
Return an iterator to the start of buf
.
Definition at line 137 of file lv2_evbuf.c.
LV2_Evbuf_Iterator lv2_evbuf_end | ( | LV2_Evbuf * | evbuf | ) |
Return an iterator to the end of buf.
Definition at line 144 of file lv2_evbuf.c.
void lv2_evbuf_free | ( | LV2_Evbuf * | evbuf | ) |
Free an event buffer allocated with lv2_evbuf_new.
Definition at line 61 of file lv2_evbuf.c.
bool lv2_evbuf_get | ( | LV2_Evbuf_Iterator | iter, |
uint32_t * | frames, | ||
uint32_t * | subframes, | ||
uint32_t * | type, | ||
uint32_t * | size, | ||
uint8_t ** | data | ||
) |
Dereference an event iterator (i.e. get the event currently pointed to). iter
must be valid. type
Set to the type of the event. size
Set to the size of the event. data
Set to the contents of the event.
Definition at line 185 of file lv2_evbuf.c.
void* lv2_evbuf_get_buffer | ( | LV2_Evbuf * | evbuf | ) |
Return the actual buffer implementation. The format of the buffer returned depends on the buffer type.
Definition at line 125 of file lv2_evbuf.c.
uint32_t lv2_evbuf_get_capacity | ( | LV2_Evbuf * | evbuf | ) |
Return the available capacity of the buffer
Definition at line 119 of file lv2_evbuf.c.
uint32_t lv2_evbuf_get_size | ( | LV2_Evbuf * | evbuf | ) |
Return the total padded size of the events stored in the buffer.
Definition at line 103 of file lv2_evbuf.c.
bool lv2_evbuf_is_valid | ( | LV2_Evbuf_Iterator | iter | ) |
Check if iter
is valid.
iter
is valid, otherwise false (past end of buffer) Definition at line 152 of file lv2_evbuf.c.
LV2_Evbuf* lv2_evbuf_new | ( | uint32_t | capacity, |
LV2_Evbuf_Type | type, | ||
uint32_t | atom_Chunk, | ||
uint32_t | atom_Sequence | ||
) |
Allocate a new, empty event buffer. URIDs for atom:Chunk and atom:Sequence must be passed for LV2_EVBUF_ATOM.
Definition at line 44 of file lv2_evbuf.c.
LV2_Evbuf_Iterator lv2_evbuf_next | ( | LV2_Evbuf_Iterator | iter | ) |
Advance iter
forward one event. iter
must be valid.
iter
is valid, otherwise false (reached end of buffer) Definition at line 158 of file lv2_evbuf.c.
void lv2_evbuf_reset | ( | LV2_Evbuf * | evbuf, |
bool | input | ||
) |
Clear and initialize an existing event buffer. The contents of buf are ignored entirely and overwritten, except capacity which is unmodified. If input is false and this is an atom buffer, the buffer will be prepared for writing by the plugin. This MUST be called before every run cycle.
Definition at line 82 of file lv2_evbuf.c.
void lv2_evbuf_set_type | ( | LV2_Evbuf * | evbuf, |
LV2_Evbuf_Type | type | ||
) |
Reset and change the type of an existing event buffer. URIDs for atom:Chunk and atom:Sequence must be passed for LV2_EVBUF_ATOM.
Definition at line 67 of file lv2_evbuf.c.
bool lv2_evbuf_write | ( | LV2_Evbuf_Iterator * | iter, |
uint32_t | frames, | ||
uint32_t | subframes, | ||
uint32_t | type, | ||
uint32_t | size, | ||
const uint8_t * | data | ||
) |
Write an event at iter
. The event (if any) pointed to by iter
will be overwritten, and iter
incremented to point to the following event (i.e. several calls to this function can be done in sequence without twiddling iter in-between).
Definition at line 230 of file lv2_evbuf.c.