From 059f20c9666234f2be01498ee04f1e7ee795ba8f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 6 Mar 2010 10:23:19 +0000 Subject: Save Ingen patches as working standard LV2 plugin bundles. This allows you to create an Ingen patch in Ingen running as a Jack client, save it, then load that patch as an LV2 plugin in any LV2 compliant host. Eliminate (hopefully) all static data in the engine (for multiple instantiations in a single process). More API/ABI stable interface for Ingen::Shared::World. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2533 a436a847-0d15-0410-975c-d299462d15a1 --- src/shared/LV2URIMap.cpp | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'src/shared/LV2URIMap.cpp') diff --git a/src/shared/LV2URIMap.cpp b/src/shared/LV2URIMap.cpp index d8114014..e069a644 100644 --- a/src/shared/LV2URIMap.cpp +++ b/src/shared/LV2URIMap.cpp @@ -19,11 +19,10 @@ #include #include #include +#include #include "raul/log.hpp" #include "object.lv2/object.h" #include "LV2URIMap.hpp" -#include "module/ingen_module.hpp" -#include "module/World.hpp" using namespace std; using namespace Raul; @@ -38,6 +37,12 @@ LV2URIMap::Quark::Quark(const char* c_str) { } +const char* +LV2URIMap::Quark::c_str() const +{ + return g_quark_to_string(id); +} + #define NS_CTX "http://lv2plug.in/ns/dev/contexts#" #define NS_INGEN "http://drobilla.net/ns/ingen#" #define NS_INGENUI "http://drobilla.net/ns/ingenuity#" @@ -114,23 +119,14 @@ LV2URIMap::LV2URIMap() } -const LV2URIMap& -LV2URIMap::instance() -{ - return *ingen_get_world()->uris; -} +struct null_deleter { void operator()(void const *) const {} }; uint32_t LV2URIMap::uri_to_id(const char* map, const char* uri) { - const uint32_t ret = static_cast(g_quark_from_string(uri)); - debug << "[LV2URIMap] "; - if (map) - debug << map << " : "; - debug << uri << " => " << ret << endl; - return ret; + return static_cast(g_quark_from_string(uri)); } -- cgit v1.2.1