From 8de887f378b13e558bdd74e88be79dc96df9d7b4 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 29 Feb 2012 03:21:37 +0000 Subject: Update to latest LV2 atom extension. git-svn-id: svn://localhost/ardour2/branches/3.0@11548 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/lv2_evbuf.h | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'libs/ardour/lv2_evbuf.h') diff --git a/libs/ardour/lv2_evbuf.h b/libs/ardour/lv2_evbuf.h index b2caa12e28..fdb7766f96 100644 --- a/libs/ardour/lv2_evbuf.h +++ b/libs/ardour/lv2_evbuf.h @@ -18,10 +18,11 @@ #define LV2_EVBUF_H #include -#include #ifdef __cplusplus extern "C" { +#else +#include #endif /** @@ -54,11 +55,13 @@ 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. + URIDs for atom:Chunk and atom:Sequence must be passed for LV2_EVBUF_ATOM. */ LV2_Evbuf* -lv2_evbuf_new(uint32_t capacity, LV2_Evbuf_Type type, uint32_t atom_type); +lv2_evbuf_new(uint32_t capacity, + LV2_Evbuf_Type type, + uint32_t atom_Chunk, + uint32_t atom_Sequence); /** Free an event buffer allocated with lv2_evbuf_new. @@ -67,21 +70,21 @@ 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. + Reset and change the type of an existing event buffer. + URIDs for atom:Chunk and atom:Sequence must be passed for LV2_EVBUF_ATOM. */ void -lv2_evbuf_set_type(LV2_Evbuf* evbuf, LV2_Evbuf_Type type, uint32_t atom_type); +lv2_evbuf_set_type(LV2_Evbuf* evbuf, LV2_Evbuf_Type type); /** 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. */ void -lv2_evbuf_reset(LV2_Evbuf* evbuf); +lv2_evbuf_reset(LV2_Evbuf* evbuf, bool input); /** Return the total padded size of the events stored in the buffer. -- cgit v1.2.3