0001-Fix-blocked-patch-Set-messages.patch (1,765 bytes)
From e74ff1e92aa262f80c86b92ae9edc896dc32e319 Mon Sep 17 00:00:00 2001
From: Hanspeter Portner <dev@open-music-kontrollers.ch>
Date: Thu, 17 Mar 2016 23:01:33 +0100
Subject: [PATCH] Fix blocked patch:Set messages.
---
libs/ardour/lv2_plugin.cc | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc
index 3b9a3ef..d707d3e 100644
--- a/libs/ardour/lv2_plugin.cc
+++ b/libs/ardour/lv2_plugin.cc
@@ -2464,19 +2464,18 @@ LV2Plugin::connect_and_run(BufferSet& bufs,
_uri_map.urids.patch_value, &value,
0);
- if (!property || !value ||
- property->type != _uri_map.urids.atom_URID ||
- value->type != _uri_map.urids.atom_Path) {
+ if (property && value &&
+ property->type == _uri_map.urids.atom_URID &&
+ value->type == _uri_map.urids.atom_Path) {
+ const uint32_t prop_id = ((const LV2_Atom_URID*)property)->body;
+ const char* path = (const char*)LV2_ATOM_BODY_CONST(value);
+
+ // Emit PropertyChanged signal for UI
+ // TODO: This should emit the control's Changed signal
+ PropertyChanged(prop_id, Variant(Variant::PATH, path));
+ } else {
std::cerr << "warning: patch:Set for unknown property" << std::endl;
- continue;
}
-
- const uint32_t prop_id = ((const LV2_Atom_URID*)property)->body;
- const char* path = (const char*)LV2_ATOM_BODY_CONST(value);
-
- // Emit PropertyChanged signal for UI
- // TODO: This should emit the control's Changed signal
- PropertyChanged(prop_id, Variant(Variant::PATH, path));
}
}
}
--
2.7.3