summaryrefslogtreecommitdiffstats
path: root/src/engine/InternalPlugin.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-03-06 10:23:19 +0000
committerDavid Robillard <d@drobilla.net>2010-03-06 10:23:19 +0000
commit059f20c9666234f2be01498ee04f1e7ee795ba8f (patch)
treeef0d53073d53012aeaa7d084fccf477b166c0684 /src/engine/InternalPlugin.cpp
parent085a451dfec54126be1b9346899c81d82e6eb58e (diff)
downloadingen-059f20c9666234f2be01498ee04f1e7ee795ba8f.tar.gz
ingen-059f20c9666234f2be01498ee04f1e7ee795ba8f.tar.bz2
ingen-059f20c9666234f2be01498ee04f1e7ee795ba8f.zip
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
Diffstat (limited to 'src/engine/InternalPlugin.cpp')
-rw-r--r--src/engine/InternalPlugin.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/engine/InternalPlugin.cpp b/src/engine/InternalPlugin.cpp
index 802ec955..fdb0cd96 100644
--- a/src/engine/InternalPlugin.cpp
+++ b/src/engine/InternalPlugin.cpp
@@ -32,11 +32,11 @@ namespace Ingen {
using namespace Internals;
-InternalPlugin::InternalPlugin(const std::string& uri, const std::string& symbol)
- : PluginImpl(Plugin::Internal, uri)
+InternalPlugin::InternalPlugin(Shared::LV2URIMap& uris,
+ const std::string& uri, const std::string& symbol)
+ : PluginImpl(uris, Plugin::Internal, uri)
, _symbol(symbol)
{
- const LV2URIMap& uris = Shared::LV2URIMap::instance();
set_property(uris.rdf_type, uris.ingen_Internal);
}
@@ -53,14 +53,15 @@ InternalPlugin::instantiate(BufferFactory& bufs,
const SampleCount srate = engine.driver()->sample_rate();
const string uri_str = uri().str();
+
if (uri_str == NS_INTERNALS "Controller") {
- return new ControllerNode(bufs, name, polyphonic, parent, srate);
+ return new ControllerNode(this, bufs, name, polyphonic, parent, srate);
} else if (uri_str == NS_INTERNALS "Delay") {
- return new DelayNode(bufs, name, polyphonic, parent, srate);
+ return new DelayNode(this, bufs, name, polyphonic, parent, srate);
} else if (uri_str == NS_INTERNALS "Note") {
- return new NoteNode(bufs, name, polyphonic, parent, srate);
+ return new NoteNode(this, bufs, name, polyphonic, parent, srate);
} else if (uri_str == NS_INTERNALS "Trigger") {
- return new TriggerNode(bufs, name, polyphonic, parent, srate);
+ return new TriggerNode(this, bufs, name, polyphonic, parent, srate);
} else {
return NULL;
}