diff options
Diffstat (limited to 'src/engine')
-rw-r--r-- | src/engine/ControlBindings.cpp | 3 | ||||
-rw-r--r-- | src/engine/HTTPClientSender.cpp | 6 | ||||
-rw-r--r-- | src/engine/InputPort.cpp | 6 | ||||
-rw-r--r-- | src/engine/LV2Node.cpp | 10 |
4 files changed, 18 insertions, 7 deletions
diff --git a/src/engine/ControlBindings.cpp b/src/engine/ControlBindings.cpp index 2c2a1888..2874fa05 100644 --- a/src/engine/ControlBindings.cpp +++ b/src/engine/ControlBindings.cpp @@ -75,8 +75,7 @@ ControlBindings::remove(const Raul::Path& path) { ThreadManager::assert_thread(THREAD_PRE_PROCESS); - SharedPtr<Bindings> old_bindings = _bindings; - + SharedPtr<Bindings> old_bindings(_bindings); SharedPtr<Bindings> copy(new Bindings(*_bindings.get())); for (Bindings::iterator i = copy->begin(); i != copy->end();) { diff --git a/src/engine/HTTPClientSender.cpp b/src/engine/HTTPClientSender.cpp index 0c14b06f..aacf9479 100644 --- a/src/engine/HTTPClientSender.cpp +++ b/src/engine/HTTPClientSender.cpp @@ -104,9 +104,9 @@ HTTPClientSender::set_property(const URI& subject, const URI& key, const Atom& v { Redland::Node node = AtomRDF::atom_to_node(*_engine.world()->rdf_world, value); const string msg = string( - "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n" - "@prefix ingen: <http://drobilla.net/ns/ingen#> .\n" - "@prefix ingen-ui: <http://drobilla.net/ns/ingenuity#> .\n").append( + "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n" + "@prefix ingen: <http://drobilla.net/ns/ingen#> .\n" + "@prefix ingenui: <http://drobilla.net/ns/ingenuity#> .\n").append( subject.str()).append("> ingen:property [\n" "rdf:predicate ").append(key.str()).append(" ;\n" "rdf:value ").append(node.to_string()).append("\n] .\n"); diff --git a/src/engine/InputPort.cpp b/src/engine/InputPort.cpp index 010fdd93..80ae836d 100644 --- a/src/engine/InputPort.cpp +++ b/src/engine/InputPort.cpp @@ -49,6 +49,12 @@ InputPort::InputPort(BufferFactory& bufs, { if (!dynamic_cast<Patch*>(parent)) add_property("rdf:type", Raul::Atom(Raul::Atom::URI, "lv2:InputPort")); + + // Set default control range + if (type == PortType::CONTROL) { + set_property("lv2:minimum", 0.0f); + set_property("lv2:maximum", 1.0f); + } } diff --git a/src/engine/LV2Node.cpp b/src/engine/LV2Node.cpp index 003a6284..574a4eeb 100644 --- a/src/engine/LV2Node.cpp +++ b/src/engine/LV2Node.cpp @@ -280,8 +280,14 @@ LV2Node::instantiate(BufferFactory& bufs) if (direction == INPUT && data_type == PortType::CONTROL) { ((AudioBuffer*)port->buffer(0).get())->set_value(val.get_float(), 0, 0); - port->set_property("lv2:minimum", min_values[j]); - port->set_property("lv2:maximum", max_values[j]); + if (!isnan(min_values[j])) { + port->meta().set_property("lv2:minimum", min_values[j]); + port->set_property("lv2:minimum", min_values[j]); + } + if (!isnan(max_values[j])) { + port->meta().set_property("lv2:maximum", max_values[j]); + port->set_property("lv2:maximum", max_values[j]); + } } SLV2Values contexts = slv2_port_get_value(plug, id, context_pred); |