diff options
Diffstat (limited to 'src/lv2_evbuf.h')
-rw-r--r-- | src/lv2_evbuf.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lv2_evbuf.h b/src/lv2_evbuf.h index e637b9e..b2caa12 100644 --- a/src/lv2_evbuf.h +++ b/src/lv2_evbuf.h @@ -54,9 +54,11 @@ typedef struct { /** Allocate a new, empty event buffer. + The URID for atom:Sequence must be passed for atom_Sequence if type is + LV2_EVBUF_ATOM. */ LV2_Evbuf* -lv2_evbuf_new(uint32_t capacity, LV2_Evbuf_Type type); +lv2_evbuf_new(uint32_t capacity, LV2_Evbuf_Type type, uint32_t atom_type); /** Free an event buffer allocated with lv2_evbuf_new. @@ -65,6 +67,15 @@ void lv2_evbuf_free(LV2_Evbuf* evbuf); /** + Change the type of an existing event buffer. This will clear and reset the + buffer, it is not possible to change the type and preserve the buffer + contents since the formats differ. The URID for atom:Sequence must be + passed for atom_Sequence if type is LV2_EVBUF_ATOM. +*/ +void +lv2_evbuf_set_type(LV2_Evbuf* evbuf, LV2_Evbuf_Type type, uint32_t atom_type); + +/** Clear and initialize an existing event buffer. The contents of buf are ignored entirely and overwritten, except capacity which is unmodified. |