diff options
author | Hanspeter Portner <dev@open-music-kontrollers.ch> | 2016-03-17 23:01:33 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-03-18 23:36:11 +0100 |
commit | b0937edeec74b8afe054f313cf9d8d72cd3e3400 (patch) | |
tree | 7886c1a52daffbe9feecc385f8020b5810e0b62b /libs | |
parent | abd65cfc70c72115bbe35aac86ff3721ef9131ef (diff) |
Fix blocked patch:Set messages.
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/lv2_plugin.cc | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc index 3b9a3ef286..d707d3e375 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)); } } } |