summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-11-17 19:42:02 +0000
committerDavid Robillard <d@drobilla.net>2012-11-17 19:42:02 +0000
commita24fe8e0f2085d22905df871e2e3a0d90498583f (patch)
tree149c3a54c0b77d65bb57d74624650f0fb806120a /src
parent7767a8405496d3f2eba6594bfc1d57f25f8907ff (diff)
downloadingen-a24fe8e0f2085d22905df871e2e3a0d90498583f.tar.gz
ingen-a24fe8e0f2085d22905df871e2e3a0d90498583f.tar.bz2
ingen-a24fe8e0f2085d22905df871e2e3a0d90498583f.zip
LV2 time support when running as a plugin.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4823 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/server/ingen_lv2.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp
index dc274a32..fcada858 100644
--- a/src/server/ingen_lv2.cpp
+++ b/src/server/ingen_lv2.cpp
@@ -249,7 +249,19 @@ public:
virtual void append_time_events(ProcessContext& context,
Buffer& buffer)
- {}
+ {
+ 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_Blank &&
+ ((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));
+ }
+ }
+ }
/** Called in run thread for events received at control input port. */
void enqueue_message(const LV2_Atom* atom) {