summaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-02-14 09:22:52 +0100
committerDavid Robillard <d@drobilla.net>2017-02-14 09:22:52 +0100
commit4a7ebef865e91e6df521d61f55c5baa709e7776f (patch)
treee90520b798f5d016058d01035b1e16907d7ee448 /src/server
parent0faf69db76f668944d9380152fd4f9080d9e6152 (diff)
downloadingen-4a7ebef865e91e6df521d61f55c5baa709e7776f.tar.gz
ingen-4a7ebef865e91e6df521d61f55c5baa709e7776f.tar.bz2
ingen-4a7ebef865e91e6df521d61f55c5baa709e7776f.zip
Fix LV2 host time events
Diffstat (limited to 'src/server')
-rw-r--r--src/server/ingen_lv2.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp
index f902a4bb..9119ae14 100644
--- a/src/server/ingen_lv2.cpp
+++ b/src/server/ingen_lv2.cpp
@@ -243,12 +243,14 @@ public:
const URIs& uris = _engine.world()->uris();
LV2_Atom_Sequence* seq = (LV2_Atom_Sequence*)_ports[0]->buffer();
LV2_ATOM_SEQUENCE_FOREACH(seq, ev) {
- if (ev->body.type == uris.atom_Object &&
- ((LV2_Atom_Object*)&ev)->body.otype == uris.time_Position) {
- buffer.append_event(ev->time.frames,
- ev->body.size,
- ev->body.type,
- (const uint8_t*)(&ev->body + 1));
+ if (ev->body.type == uris.atom_Object) {
+ const LV2_Atom_Object* obj = (LV2_Atom_Object*)&ev->body;
+ if (obj->body.otype == uris.time_Position) {
+ buffer.append_event(ev->time.frames,
+ ev->body.size,
+ ev->body.type,
+ (const uint8_t*)(&ev->body + 1));
+ }
}
}
}