summaryrefslogtreecommitdiffstats
path: root/src/engine/internals/Delay.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/internals/Delay.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/internals/Delay.cpp')
-rw-r--r--src/engine/internals/Delay.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/engine/internals/Delay.cpp b/src/engine/internals/Delay.cpp
index 7910713f..1316c567 100644
--- a/src/engine/internals/Delay.cpp
+++ b/src/engine/internals/Delay.cpp
@@ -49,18 +49,24 @@ using namespace Shared;
static const float MAX_DELAY_SECONDS = 8.0f;
-static InternalPlugin note_plugin(NS_INTERNALS "Delay", "delay");
-
-InternalPlugin& DelayNode::internal_plugin() { return note_plugin; }
+InternalPlugin* DelayNode::internal_plugin(Shared::LV2URIMap& uris) {
+ return new InternalPlugin(uris, NS_INTERNALS "Delay", "delay");
+}
-DelayNode::DelayNode(BufferFactory& bufs, const string& path, bool polyphonic, PatchImpl* parent, SampleRate srate)
- : NodeImpl(&note_plugin, path, polyphonic, parent, srate)
+DelayNode::DelayNode(
+ InternalPlugin* plugin,
+ BufferFactory& bufs,
+ const std::string& path,
+ bool polyphonic,
+ PatchImpl* parent,
+ SampleRate srate)
+ : NodeImpl(plugin, path, polyphonic, parent, srate)
, _buffer(0)
, _buffer_length(0)
, _buffer_mask(0)
, _write_phase(0)
{
- const LV2URIMap& uris = Shared::LV2URIMap::instance();
+ const LV2URIMap& uris = bufs.uris();
_ports = new Raul::Array<PortImpl*>(3);
const float default_delay = 1.0f;