Remove dead code
[ardour.git] / libs / ardour / lv2_evbuf.h
index b2caa12e280a5604cad3d91fcbff93ae18333499..3700be8e0288c3224001f056de892f6611e7ce91 100644 (file)
 #define LV2_EVBUF_H
 
 #include <stdint.h>
-#include <stdbool.h>
 
 #ifdef __cplusplus
 extern "C" {
+#else
+#include <stdbool.h>
 #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.
@@ -89,6 +92,12 @@ lv2_evbuf_reset(LV2_Evbuf* evbuf);
 uint32_t
 lv2_evbuf_get_size(LV2_Evbuf* evbuf);
 
+/**
+   Return the available capacity of the buffer
+*/
+uint32_t
+lv2_evbuf_get_capacity(LV2_Evbuf* evbuf);
+
 /**
    Return the actual buffer implementation.
    The format of the buffer returned depends on the buffer type.