View Issue Details

IDCategoryLast Update
0006823bugs2020-04-19 20:17
ReporterventosusAssigned Tox42 
Reproducibilityalways 
Status closedResolutionfixed 
PlatformanyOSanyOS Versionany
Product Version 
Fixed in Version 
Summary0006823: Fix dropped patch:Set messages
DescriptionSince recently, every patch:Set message that is NOT an atom:Path is being dropped by Ardour and not sent on to the plugin UI.
Steps To ReproduceTry sending a patch:Set message with ANY other patch:value type BUT atom:Path (e.g atom:String, atom:Int, ...) from plugin DSP to plugin UI. It'll never reach the UI because Ardour continues the event loop without handing the message over to the plugin UI ('write_to_ui' is never called).
Additional InformationPatch attached
TagsNo tags attached.

Activities

ventosus

2016-03-17 22:13

reporter  

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

x42

2016-03-18 22:36

administrator   ~0018073

merged in Ardour 4.7-387-gb0937ed - Thanks a lot!

system

2020-04-19 20:17

developer   ~0023603

Issue has been closed automatically, by Trigger Close Plugin.
Feel free to re-open with additional information if you think the issue is not resolved.

Issue History

Date Modified Username Field Change
2016-03-17 22:13 ventosus New Issue
2016-03-17 22:13 ventosus File Added: 0001-Fix-blocked-patch-Set-messages.patch
2016-03-18 22:36 x42 Note Added: 0018073
2016-03-18 22:36 x42 Status new => resolved
2016-03-18 22:36 x42 Resolution open => fixed
2016-03-18 22:36 x42 Assigned To => x42
2020-04-19 20:17 system Note Added: 0023603
2020-04-19 20:17 system Status resolved => closed