aboutsummaryrefslogtreecommitdiffstats
path: root/src/lv2_evbuf.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-02-18 01:15:43 +0000
committerDavid Robillard <d@drobilla.net>2012-02-18 01:15:43 +0000
commit719c973b349724657c71b545f4f3d4498d633b23 (patch)
treef3c6e65aecb0b01ee5d6fb6a5fdbfb2cb87f1c76 /src/lv2_evbuf.c
parent21f5ce9b56bc0e0b3a38ee84bdd7e0992485c133 (diff)
downloadjalv-719c973b349724657c71b545f4f3d4498d633b23.tar.gz
jalv-719c973b349724657c71b545f4f3d4498d633b23.tar.bz2
jalv-719c973b349724657c71b545f4f3d4498d633b23.zip
Implement/fix atom event port UI notifications.
git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@3985 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/lv2_evbuf.c')
-rw-r--r--src/lv2_evbuf.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/lv2_evbuf.c b/src/lv2_evbuf.c
index f273934..96c077f 100644
--- a/src/lv2_evbuf.c
+++ b/src/lv2_evbuf.c
@@ -53,7 +53,7 @@ lv2_evbuf_new(uint32_t capacity, LV2_Evbuf_Type type)
evbuf->buf.atom.data = (LV2_Atom*)((uint8_t*)evbuf + sizeof(LV2_Evbuf));
evbuf->buf.atom.size = sizeof(LV2_Atom_Port_Buffer);
evbuf->buf.atom.capacity = capacity - sizeof(LV2_Atom);
- // FIXME: set type
+ evbuf->buf.atom.data->type = 0; // FIXME: set type to atom:Sequence
evbuf->buf.atom.data->size = 0;
break;
}
@@ -169,11 +169,14 @@ lv2_evbuf_get(LV2_Evbuf_Iterator iter,
return false;
}
- LV2_Event* ev;
- LV2_Atom_Event* aev;
+ LV2_Event_Buffer* ebuf;
+ LV2_Event* ev;
+ LV2_Atom_Port_Buffer* abuf;
+ LV2_Atom_Event* aev;
switch (iter.evbuf->type) {
case LV2_EVBUF_EVENT:
- ev = (LV2_Event*)(iter.evbuf->buf.event.data + iter.offset);
+ ebuf = &iter.evbuf->buf.event;
+ ev = (LV2_Event*)ebuf->data + iter.offset;
*frames = ev->frames;
*subframes = ev->subframes;
*type = ev->type;
@@ -181,8 +184,9 @@ lv2_evbuf_get(LV2_Evbuf_Iterator iter,
*data = (uint8_t*)ev + sizeof(LV2_Event);
break;
case LV2_EVBUF_ATOM:
+ abuf = &iter.evbuf->buf.atom;
aev = (LV2_Atom_Event*)(
- (char*)LV2_ATOM_CONTENTS(LV2_Atom_Sequence, iter.evbuf->buf.atom.data)
+ (char*)LV2_ATOM_CONTENTS(LV2_Atom_Sequence, abuf->data)
+ iter.offset);
*frames = aev->time.audio.frames;
*subframes = aev->time.audio.subframes;