diff options
author | David Robillard <d@drobilla.net> | 2010-03-06 10:23:19 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-03-06 10:23:19 +0000 |
commit | 059f20c9666234f2be01498ee04f1e7ee795ba8f (patch) | |
tree | ef0d53073d53012aeaa7d084fccf477b166c0684 /src/engine/PatchImpl.cpp | |
parent | 085a451dfec54126be1b9346899c81d82e6eb58e (diff) | |
download | ingen-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/PatchImpl.cpp')
-rw-r--r-- | src/engine/PatchImpl.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/engine/PatchImpl.cpp b/src/engine/PatchImpl.cpp index 5d3b07a5..bce74b6b 100644 --- a/src/engine/PatchImpl.cpp +++ b/src/engine/PatchImpl.cpp @@ -18,6 +18,8 @@ #include <cassert> #include <cmath> #include "raul/log.hpp" +#include "module/World.hpp" +#include "shared/LV2URIMap.hpp" #include "ThreadManager.hpp" #include "NodeImpl.hpp" #include "PatchImpl.hpp" @@ -39,7 +41,8 @@ using namespace Shared; PatchImpl::PatchImpl(Engine& engine, const Raul::Symbol& symbol, uint32_t poly, PatchImpl* parent, SampleRate srate, uint32_t internal_poly) - : NodeImpl(new PatchPlugin("http://example.org/FIXME", "patch", "Ingen Patch"), + : NodeImpl(new PatchPlugin(*engine.world()->uris().get(), + engine.world()->uris()->ingen_Patch.c_str(), "patch", "Ingen Patch"), symbol, poly, parent, srate) , _engine(engine) , _internal_poly(internal_poly) @@ -338,9 +341,7 @@ PatchImpl::has_connection(const PortImpl* src_port, const PortImpl* dst_port) co uint32_t PatchImpl::num_ports() const { - ThreadID context = ThreadManager::current_thread_id(); - - if (context == THREAD_PROCESS) + if (ThreadManager::thread_is(THREAD_PROCESS)) return NodeImpl::num_ports(); else return _input_ports.size() + _output_ports.size(); |