summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-10-01 18:56:59 -0400
committerDavid Robillard <d@drobilla.net>2016-10-01 18:56:59 -0400
commitc1a28255f7e92e5e7a6bfe37510bcf079e334338 (patch)
tree9aa3593e3f1d7869a8130b6473f32712d10d1c57
parent17bb541a6925ccae826bbaa7bf386931652afbf4 (diff)
downloadingen-c1a28255f7e92e5e7a6bfe37510bcf079e334338.tar.gz
ingen-c1a28255f7e92e5e7a6bfe37510bcf079e334338.tar.bz2
ingen-c1a28255f7e92e5e7a6bfe37510bcf079e334338.zip
Fix properties of control/notify ports
-rw-r--r--ingen/URIs.hpp1
-rw-r--r--src/URIs.cpp1
-rw-r--r--src/server/events/CreateGraph.cpp13
3 files changed, 9 insertions, 6 deletions
diff --git a/ingen/URIs.hpp b/ingen/URIs.hpp
index 5f448e02..6a691ba2 100644
--- a/ingen/URIs.hpp
+++ b/ingen/URIs.hpp
@@ -143,6 +143,7 @@ public:
const Quark lv2_appliesTo;
const Quark lv2_binary;
const Quark lv2_connectionOptional;
+ const Quark lv2_control;
const Quark lv2_default;
const Quark lv2_designation;
const Quark lv2_enumeration;
diff --git a/src/URIs.cpp b/src/URIs.cpp
index 4b771473..7eedd208 100644
--- a/src/URIs.cpp
+++ b/src/URIs.cpp
@@ -126,6 +126,7 @@ URIs::URIs(Forge& f, URIMap* map, LilvWorld* lworld)
, lv2_appliesTo (forge, map, lworld, LV2_CORE__appliesTo)
, lv2_binary (forge, map, lworld, LV2_CORE__binary)
, lv2_connectionOptional(forge, map, lworld, LV2_CORE__connectionOptional)
+ , lv2_control (forge, map, lworld, LV2_CORE__control)
, lv2_default (forge, map, lworld, LV2_CORE__default)
, lv2_designation (forge, map, lworld, LV2_CORE__designation)
, lv2_enumeration (forge, map, lworld, LV2_CORE__enumeration)
diff --git a/src/server/events/CreateGraph.cpp b/src/server/events/CreateGraph.cpp
index ae359e17..40f539f7 100644
--- a/src/server/events/CreateGraph.cpp
+++ b/src/server/events/CreateGraph.cpp
@@ -52,17 +52,18 @@ CreateGraph::build_child_events()
// Properties common to both ports
Resource::Properties control_properties;
- control_properties.put(uris.rdf_type, uris.atom_AtomPort);
control_properties.put(uris.atom_bufferType, uris.atom_Sequence);
control_properties.put(uris.atom_supports, uris.patch_Message);
- control_properties.put(uris.rsz_minimumSize, uris.forge.make(4096));
+ control_properties.put(uris.lv2_designation, uris.lv2_control);
control_properties.put(uris.lv2_portProperty, uris.lv2_connectionOptional);
+ control_properties.put(uris.rdf_type, uris.atom_AtomPort);
+ control_properties.put(uris.rsz_minimumSize, uris.forge.make(4096));
- // Add control input
+ // Add control port (message receive)
Resource::Properties in_properties(control_properties);
+ in_properties.put(uris.lv2_index, uris.forge.make(0));
in_properties.put(uris.lv2_name, uris.forge.alloc("Control"));
in_properties.put(uris.rdf_type, uris.lv2_InputPort);
- in_properties.put(uris.lv2_index, uris.forge.make(0));
in_properties.put(uris.ingen_canvasX, uris.forge.make(32.0f),
Resource::Graph::EXTERNAL);
in_properties.put(uris.ingen_canvasY, uris.forge.make(32.0f),
@@ -75,11 +76,11 @@ CreateGraph::build_child_events()
_path.child(Raul::Symbol("control")),
in_properties)));
- // Add control out
+ // Add notify port (message respond)
Resource::Properties out_properties(control_properties);
+ out_properties.put(uris.lv2_index, uris.forge.make(1));
out_properties.put(uris.lv2_name, uris.forge.alloc("Notify"));
out_properties.put(uris.rdf_type, uris.lv2_OutputPort);
- out_properties.put(uris.lv2_index, uris.forge.make(1));
out_properties.put(uris.ingen_canvasX, uris.forge.make(128.0f),
Resource::Graph::EXTERNAL);
out_properties.put(uris.ingen_canvasY, uris.forge.make(32.0f),