summaryrefslogtreecommitdiffstats
path: root/src/engine/LV2EventBuffer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/LV2EventBuffer.cpp')
-rw-r--r--src/engine/LV2EventBuffer.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/engine/LV2EventBuffer.cpp b/src/engine/LV2EventBuffer.cpp
index 20df73c4..cb157368 100644
--- a/src/engine/LV2EventBuffer.cpp
+++ b/src/engine/LV2EventBuffer.cpp
@@ -134,6 +134,19 @@ LV2EventBuffer::get_object() const
}
+/** Get the event currently pointed to, or NULL if invalid.
+ */
+LV2_Event*
+LV2EventBuffer::get_event() const
+{
+ if (lv2_event_is_valid(&_iter)) {
+ uint8_t* data;
+ return lv2_event_get(&_iter, &data);
+ }
+ return NULL;
+}
+
+
/** Append an event to the buffer.
*
* \a timestamp must be >= the latest event in the buffer.