diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/DeprecatedLoader.cpp | 1 | ||||
-rw-r--r-- | src/engine/InternalPlugin.hpp | 1 | ||||
-rw-r--r-- | src/engine/PortImpl.cpp | 10 | ||||
-rw-r--r-- | src/engine/events/SetMetadataEvent.cpp | 2 | ||||
-rw-r--r-- | src/serialisation/Parser.cpp | 21 | ||||
-rw-r--r-- | src/shared/ResourceImpl.cpp | 6 |
6 files changed, 17 insertions, 24 deletions
diff --git a/src/client/DeprecatedLoader.cpp b/src/client/DeprecatedLoader.cpp index 61e80b82..bbc5905d 100644 --- a/src/client/DeprecatedLoader.cpp +++ b/src/client/DeprecatedLoader.cpp @@ -32,7 +32,6 @@ #include "interface/EngineInterface.hpp" #include "DeprecatedLoader.hpp" -#define NS_INGEN "http://drobilla.net/ns/ingen#" #define NS_INTERNALS "http://drobilla.net/ns/ingen-internals#" using namespace std; diff --git a/src/engine/InternalPlugin.hpp b/src/engine/InternalPlugin.hpp index abb49cbd..3c0583cd 100644 --- a/src/engine/InternalPlugin.hpp +++ b/src/engine/InternalPlugin.hpp @@ -32,7 +32,6 @@ #include <iostream> #include "PluginImpl.hpp" -#define NS_INGEN "http://drobilla.net/ns/ingen#" #define NS_INTERNALS "http://drobilla.net/ns/ingen-internals#" namespace Ingen { diff --git a/src/engine/PortImpl.cpp b/src/engine/PortImpl.cpp index c81e797a..913bbc2e 100644 --- a/src/engine/PortImpl.cpp +++ b/src/engine/PortImpl.cpp @@ -66,16 +66,10 @@ PortImpl::PortImpl(NodeImpl* const node, else _polyphonic = true; - if (type == DataType::AUDIO) - add_property("rdf:type", Atom(Atom::URI, "lv2:AudioPort")); + add_property("rdf:type", Atom(Atom::URI, type.uri())); - if (type == DataType::CONTROL) - add_property("rdf:type", Atom(Atom::URI, "lv2:ControlPort")); - - if (type == DataType::EVENT) { - add_property("rdf:type", Atom(Atom::URI, "lv2ev:EventPort")); + if (type == DataType::EVENT) _broadcast = true; // send activity blips - } assert(_buffers->size() > 0); } diff --git a/src/engine/events/SetMetadataEvent.cpp b/src/engine/events/SetMetadataEvent.cpp index 482656ca..00db9161 100644 --- a/src/engine/events/SetMetadataEvent.cpp +++ b/src/engine/events/SetMetadataEvent.cpp @@ -53,6 +53,8 @@ SetMetadataEvent::SetMetadataEvent( , _is_meta(meta) , _success(false) { + cerr << "SET " << subject << " : " << key << " = " << value << endl; + assert(value.type() != Atom::URI || strcmp(value.get_uri(), "lv2:ControlPort")); } diff --git a/src/serialisation/Parser.cpp b/src/serialisation/Parser.cpp index 647c90be..781278a4 100644 --- a/src/serialisation/Parser.cpp +++ b/src/serialisation/Parser.cpp @@ -35,9 +35,6 @@ using namespace Ingen::Shared; namespace Ingen { namespace Serialisation { -#define NS_INGEN "http://drobilla.net/ns/ingen#" -#define NS_LV2 "http://lv2plug.in/ns/lv2core#" -#define NS_LV2EV "http://lv2plug.in/ns/ext/event#" static Glib::ustring relative_uri(Glib::ustring base, const Glib::ustring uri, bool leading_slash) @@ -278,13 +275,13 @@ Parser::parse( Redland::Query query(*world->rdf_world, query_str); Redland::Query::Results results(query.run(*world->rdf_world, model, document_uri)); - const Redland::Node patch_class (*world->rdf_world, res, NS_INGEN "Patch"); - const Redland::Node node_class (*world->rdf_world, res, NS_INGEN "Node"); - const Redland::Node internal_class (*world->rdf_world, res, NS_INGEN "Internal"); - const Redland::Node ladspa_class (*world->rdf_world, res, NS_INGEN "LADSPAPlugin"); - const Redland::Node in_port_class (*world->rdf_world, res, NS_LV2 "InputPort"); - const Redland::Node out_port_class (*world->rdf_world, res, NS_LV2 "OutputPort"); - const Redland::Node lv2_class (*world->rdf_world, res, NS_LV2 "Plugin"); + const Redland::Node patch_class (*world->rdf_world, res, "ingen:Patch"); + const Redland::Node node_class (*world->rdf_world, res, "ingen:Node"); + const Redland::Node internal_class (*world->rdf_world, res, "ingen:Internal"); + const Redland::Node ladspa_class (*world->rdf_world, res, "ingen:LADSPAPlugin"); + const Redland::Node in_port_class (*world->rdf_world, res, "lv2:InputPort"); + const Redland::Node out_port_class (*world->rdf_world, res, "lv2:OutputPort"); + const Redland::Node lv2_class (*world->rdf_world, res, "lv2:Plugin"); const Redland::Node subject_node = (data_path && !data_path->is_root()) ? Redland::Node(*world->rdf_world, res, data_path->chop_start("/")) @@ -614,9 +611,9 @@ Parser::parse_patch( bool is_output = false; Redland::Node* type = 0; for (Properties::iterator t = types_range.first; t != types_range.second; ++t) { - if (t->second.to_string() == NS_LV2 "InputPort") { + if (t->second.to_string() == "lv2:InputPort") { is_input = true; - } else if (t->second.to_string() == NS_LV2 "OutputPort") { + } else if (t->second.to_string() == "lv2:OutputPort") { is_output = true; } else if (!type || type->to_string() == t->second.to_string()) { type = &t->second; diff --git a/src/shared/ResourceImpl.cpp b/src/shared/ResourceImpl.cpp index 784c82b8..9e403be3 100644 --- a/src/shared/ResourceImpl.cpp +++ b/src/shared/ResourceImpl.cpp @@ -38,7 +38,7 @@ ResourceImpl::add_property(const Raul::URI& uri, const Raul::Atom& value) // Ignore duplicate statements typedef Resource::Properties::const_iterator iterator; const std::pair<iterator,iterator> range = _properties.equal_range(uri); - for (iterator i = range.first; i != range.second; ++i) + for (iterator i = range.first; i != range.second && i != _properties.end(); ++i) if (i->second == value) return; @@ -50,6 +50,8 @@ ResourceImpl::add_property(const Raul::URI& uri, const Raul::Atom& value) void ResourceImpl::set_property(const Raul::URI& uri, const Raul::Atom& value) { + cerr << "SET PROPERTY " << uri << " = " << value << endl; + assert(value.type() != Raul::Atom::URI || strcmp(value.get_uri(), "lv2:ControlPort")); _properties.erase(uri); _properties.insert(make_pair(uri, value)); } @@ -128,7 +130,7 @@ ResourceImpl::merge_properties(const Properties& p) { typedef Resource::Properties::const_iterator iterator; for (iterator i = p.begin(); i != p.end(); ++i) - set_property(i->first, i->second); + add_property(i->first, i->second); } |