aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/eg03-metro.lv2/metro.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-02-07 15:53:28 +0000
committerDavid Robillard <d@drobilla.net>2014-02-07 15:53:28 +0000
commit6d41effb84c6663704d7f2ed562d7bbf4f5cc441 (patch)
tree660c15c0db8a8b974c3ed46320083676d16bcbdb /plugins/eg03-metro.lv2/metro.c
parent0a4e416513dc6b8674e9116e423ad91d23326bac (diff)
downloadlv2-6d41effb84c6663704d7f2ed562d7bbf4f5cc441.tar.xz
Make eg-metro check for atom:Blank and atom:Object.
Diffstat (limited to 'plugins/eg03-metro.lv2/metro.c')
-rw-r--r--plugins/eg03-metro.lv2/metro.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/eg03-metro.lv2/metro.c b/plugins/eg03-metro.lv2/metro.c
index e7f8ead..5e484b7 100644
--- a/plugins/eg03-metro.lv2/metro.c
+++ b/plugins/eg03-metro.lv2/metro.c
@@ -38,6 +38,7 @@
typedef struct {
LV2_URID atom_Blank;
LV2_URID atom_Float;
+ LV2_URID atom_Object;
LV2_URID atom_Path;
LV2_URID atom_Resource;
LV2_URID atom_Sequence;
@@ -168,6 +169,7 @@ instantiate(const LV2_Descriptor* descriptor,
self->map = map;
uris->atom_Blank = map->map(map->handle, LV2_ATOM__Blank);
uris->atom_Float = map->map(map->handle, LV2_ATOM__Float);
+ uris->atom_Object = map->map(map->handle, LV2_ATOM__Object);
uris->atom_Path = map->map(map->handle, LV2_ATOM__Path);
uris->atom_Resource = map->map(map->handle, LV2_ATOM__Resource);
uris->atom_Sequence = map->map(map->handle, LV2_ATOM__Sequence);
@@ -308,7 +310,10 @@ run(LV2_Handle instance, uint32_t sample_count)
// Play the click for the time slice from last_t until now
play(self, last_t, ev->time.frames);
- if (ev->body.type == uris->atom_Blank) {
+ // Check if this event is an Object
+ // (or deprecated Blank to tolerate old hosts)
+ if (ev->body.type == uris->atom_Object ||
+ ev->body.type == uris->atom_Blank) {
const LV2_Atom_Object* obj = (const LV2_Atom_Object*)&ev->body;
if (obj->body.otype == uris->time_Position) {
// Received position information, update