aboutsummaryrefslogtreecommitdiff
path: root/atom_inspector.c
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2018-05-13 13:05:33 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2018-05-13 13:05:33 +0200
commit530cf64f75ca01f0a70b592c4fa4e40bba4965a6 (patch)
tree1c4a53ea095b95ef63e7f19911cc5195453a66c2 /atom_inspector.c
parent70f3794ad7a79e3764c5d90ec1eddc372a76a7c4 (diff)
downloadsherlock.lv2-530cf64f75ca01f0a70b592c4fa4e40bba4965a6.tar.xz
atom_inspector: prototype filtering by URID.
Diffstat (limited to 'atom_inspector.c')
-rw-r--r--atom_inspector.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/atom_inspector.c b/atom_inspector.c
index 8742d7c..227e398 100644
--- a/atom_inspector.c
+++ b/atom_inspector.c
@@ -241,10 +241,12 @@ run(LV2_Handle instance, uint32_t nsamples)
{
const LV2_Atom_Object *obj = (const LV2_Atom_Object *)&ev->body;
- const bool is_time = lv2_atom_forge_is_object_type(&notify->forge, obj->atom.type)
- && (obj->body.otype == handle->time_position);
+ const bool type_matches = lv2_atom_forge_is_object_type(&notify->forge, obj->atom.type)
+ ? (obj->body.otype == handle->state.filter)
+ : (obj->atom.type == handle->state.filter);
- if(!(!handle->state.time && is_time))
+ if( (!handle->state.negate && type_matches)
+ || (handle->state.negate && !type_matches) )
{
has_event = true;
if(notify->ref)