diff options
author | David Robillard <d@drobilla.net> | 2014-01-18 06:21:31 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-01-18 06:21:31 +0000 |
commit | 59492c673f5de893e8b91ca50a945a697ddfa404 (patch) | |
tree | ffbb4589f76bd4c740017e7465d286af89549156 | |
parent | bc64c953d7504c0c3986f2bea9a739cd99f0dd15 (diff) | |
download | ingen-59492c673f5de893e8b91ca50a945a697ddfa404.tar.gz ingen-59492c673f5de893e8b91ca50a945a697ddfa404.tar.bz2 ingen-59492c673f5de893e8b91ca50a945a697ddfa404.zip |
Consolidate URIs.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5316 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | src/server/ControlBindings.cpp | 4 | ||||
-rw-r--r-- | src/server/DuplexPort.cpp | 4 | ||||
-rw-r--r-- | src/server/EventWriter.cpp | 2 | ||||
-rw-r--r-- | src/server/LV2Options.hpp | 2 | ||||
-rw-r--r-- | src/server/PortType.hpp | 2 | ||||
-rw-r--r-- | src/server/events/Delta.cpp | 10 | ||||
-rw-r--r-- | src/server/events/Get.cpp | 4 | ||||
-rw-r--r-- | src/server/ingen_lv2.cpp | 12 |
8 files changed, 20 insertions, 20 deletions
diff --git a/src/server/ControlBindings.cpp b/src/server/ControlBindings.cpp index 5a633afc..fce5ba28 100644 --- a/src/server/ControlBindings.cpp +++ b/src/server/ControlBindings.cpp @@ -58,7 +58,7 @@ ControlBindings::port_binding(PortImpl* port) const { ThreadManager::assert_thread(THREAD_PRE_PROCESS); const Ingen::URIs& uris = _engine.world()->uris(); - const Atom& binding = port->get_property(uris.ingen_controlBinding); + const Atom& binding = port->get_property(uris.midi_binding); return binding_key(binding); } @@ -341,7 +341,7 @@ ControlBindings::bind(ProcessContext& context, Key key) lv2_atom_forge_set_buffer(&_forge, buf, sizeof(buf)); forge_binding(uris, &_forge, key.type, key.num); const LV2_Atom* atom = (const LV2_Atom*)buf; - context.notify(uris.ingen_controlBinding, + context.notify(uris.midi_binding, context.start(), _learn_port, atom->size, atom->type, LV2_ATOM_BODY_CONST(atom)); diff --git a/src/server/DuplexPort.cpp b/src/server/DuplexPort.cpp index 439d40ef..438d315c 100644 --- a/src/server/DuplexPort.cpp +++ b/src/server/DuplexPort.cpp @@ -64,14 +64,14 @@ DuplexPort::inherit_neighbour(const PortImpl* port, if (port->minimum().get<float>() < _min.get<float>()) { _min = port->minimum(); remove.insert(std::make_pair(_bufs.uris().lv2_minimum, - Property(_bufs.uris().wildcard))); + Property(_bufs.uris().patch_wildcard))); add.insert(std::make_pair(_bufs.uris().lv2_minimum, port->minimum())); } if (port->maximum().get<float>() > _max.get<float>()) { _max = port->maximum(); remove.insert(std::make_pair(_bufs.uris().lv2_maximum, - Property(_bufs.uris().wildcard))); + Property(_bufs.uris().patch_wildcard))); add.insert(std::make_pair(_bufs.uris().lv2_maximum, port->maximum())); } diff --git a/src/server/EventWriter.cpp b/src/server/EventWriter.cpp index 27435511..96814ed2 100644 --- a/src/server/EventWriter.cpp +++ b/src/server/EventWriter.cpp @@ -119,7 +119,7 @@ EventWriter::set_property(const Raul::URI& uri, Resource::Properties remove; remove.insert( make_pair(predicate, - Resource::Property(_engine.world()->uris().wildcard))); + Resource::Property(_engine.world()->uris().patch_wildcard))); Resource::Properties add; add.insert(make_pair(predicate, value)); _engine.enqueue_event( diff --git a/src/server/LV2Options.hpp b/src/server/LV2Options.hpp index 048d45d4..502a2573 100644 --- a/src/server/LV2Options.hpp +++ b/src/server/LV2Options.hpp @@ -51,7 +51,7 @@ public: sizeof(int32_t), _uris.atom_Int, &_block_length }, { LV2_OPTIONS_INSTANCE, 0, _uris.bufsz_sequenceSize, sizeof(int32_t), _uris.atom_Int, &_seq_size }, - { LV2_OPTIONS_INSTANCE, 0, _uris.ingen_sampleRate, + { LV2_OPTIONS_INSTANCE, 0, _uris.param_sampleRate, sizeof(int32_t), _uris.atom_Int, &_sample_rate }, { LV2_OPTIONS_INSTANCE, 0, 0, 0, 0, NULL } }; diff --git a/src/server/PortType.hpp b/src/server/PortType.hpp index 044ac41f..b1719e3b 100644 --- a/src/server/PortType.hpp +++ b/src/server/PortType.hpp @@ -76,7 +76,7 @@ private: static inline const Raul::URI& type_uri(unsigned id_num) { assert(id_num <= ATOM); static const Raul::URI uris[] = { - Raul::URI("http://drobilla.net/ns/ingen#nil"), + Raul::URI("http://www.w3.org/2002/07/owl#Nothing"), Raul::URI(LV2_CORE__AudioPort), Raul::URI(LV2_CORE__ControlPort), Raul::URI(LV2_CORE__CVPort), diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp index d551335f..91db7b21 100644 --- a/src/server/events/Delta.cpp +++ b/src/server/events/Delta.cpp @@ -151,7 +151,7 @@ Delta::pre_process() for (const auto& r : _remove) { const Raul::URI& key = r.first; const Atom& value = r.second; - if (key == uris.ingen_controlBinding && value == uris.wildcard) { + if (key == uris.midi_binding && value == uris.patch_wildcard) { PortImpl* port = dynamic_cast<PortImpl*>(_object); if (port) _old_bindings = _engine.control_bindings()->remove(port); @@ -167,7 +167,7 @@ Delta::pre_process() SpecialType op = SpecialType::NONE; if (obj) { Resource& resource = *obj; - if (value != uris.wildcard) { + if (value != uris.patch_wildcard) { resource.add_property(key, value, value.context()); } @@ -185,9 +185,9 @@ Delta::pre_process() _engine, _request_client, _request_id, _time, port, value); ev->pre_process(); _set_events.push_back(ev); - } else if (key == uris.ingen_controlBinding) { + } else if (key == uris.midi_binding) { if (port->is_a(PortType::CONTROL) || port->is_a(PortType::CV)) { - if (value == uris.wildcard) { + if (value == uris.patch_wildcard) { _engine.control_bindings()->learn(port); } else if (value.type() == uris.atom_Blank) { op = SpecialType::CONTROL_BINDING; @@ -199,7 +199,7 @@ Delta::pre_process() } } } else if ((block = dynamic_cast<BlockImpl*>(_object))) { - if (key == uris.ingen_controlBinding && value == uris.wildcard) { + if (key == uris.midi_binding && value == uris.patch_wildcard) { op = SpecialType::CONTROL_BINDING; // Internal block learn } } diff --git a/src/server/events/Get.cpp b/src/server/events/Get.cpp index 9a5dd1fa..b46f12a7 100644 --- a/src/server/events/Get.cpp +++ b/src/server/events/Get.cpp @@ -137,8 +137,8 @@ Get::post_process() // TODO: Keep a proper RDF model of the engine URIs& uris = _engine.world()->uris(); _request_client->set_property( - uris.ingen_engine, - uris.ingen_sampleRate, + Raul::URI("ingen:/engine"), + uris.param_sampleRate, uris.forge.make(int32_t(_engine.driver()->sample_rate()))); } else if (_object) { const BlockImpl* block = NULL; diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp index 03ea7f72..8bcef2da 100644 --- a/src/server/ingen_lv2.cpp +++ b/src/server/ingen_lv2.cpp @@ -40,6 +40,7 @@ #include "ingen/Log.hpp" #include "ingen/Store.hpp" #include "ingen/World.hpp" +#include "ingen/ingen.h" #include "ingen/runtime_paths.hpp" #include "ingen/serialisation/Parser.hpp" #include "ingen/serialisation/Serialiser.hpp" @@ -56,7 +57,6 @@ #include "ProcessContext.hpp" #include "ThreadManager.hpp" -#define NS_INGEN "http://drobilla.net/ns/ingen#" #define NS_RDF "http://www.w3.org/1999/02/22-rdf-syntax-ns#" #define NS_RDFS "http://www.w3.org/2000/01/rdf-schema#" @@ -446,9 +446,9 @@ find_graphs(const Glib::ustring& manifest_uri) Sord::World world; const Sord::URI base(world, manifest_uri); const Sord::Node nil; - const Sord::URI ingen_Graph (world, NS_INGEN "Graph"); - const Sord::URI rdf_type (world, NS_RDF "type"); - const Sord::URI rdfs_seeAlso(world, NS_RDFS "seeAlso"); + const Sord::URI ingen_Graph (world, INGEN__Graph); + const Sord::URI rdf_type (world, NS_RDF "type"); + const Sord::URI rdfs_seeAlso(world, NS_RDFS "seeAlso"); SerdEnv* env = serd_env_new(sord_node_to_serd_node(base.c_obj())); Sord::Model model(world, manifest_uri); @@ -702,7 +702,7 @@ ingen_save(LV2_Handle instance, return LV2_STATE_ERR_NO_FEATURE; } - LV2_URID ingen_file = plugin->map->map(plugin->map->handle, NS_INGEN "file"); + LV2_URID ingen_file = plugin->map->map(plugin->map->handle, INGEN__file); LV2_URID atom_Path = plugin->map->map(plugin->map->handle, LV2_ATOM__Path); @@ -740,7 +740,7 @@ ingen_restore(LV2_Handle instance, return LV2_STATE_ERR_NO_FEATURE; } - LV2_URID ingen_file = plugin->map->map(plugin->map->handle, NS_INGEN "file"); + LV2_URID ingen_file = plugin->map->map(plugin->map->handle, INGEN__file); size_t size; uint32_t type; uint32_t valflags; |