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/PortImpl.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/PortImpl.cpp')
-rw-r--r-- | src/engine/PortImpl.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/engine/PortImpl.cpp b/src/engine/PortImpl.cpp index 7abfb90d..0a8de1de 100644 --- a/src/engine/PortImpl.cpp +++ b/src/engine/PortImpl.cpp @@ -48,7 +48,7 @@ PortImpl::PortImpl(BufferFactory& bufs, PortType type, const Atom& value, size_t buffer_size) - : GraphObjectImpl(node, name) + : GraphObjectImpl(bufs.uris(), node, name) , _bufs(bufs) , _index(index) , _poly(poly) @@ -69,7 +69,7 @@ PortImpl::PortImpl(BufferFactory& bufs, if (_buffer_size == 0) _buffer_size = bufs.default_buffer_size(type); - const LV2URIMap& uris = Shared::LV2URIMap::instance(); + const LV2URIMap& uris = bufs.uris(); add_property(uris.rdf_type, type.uri()); set_property(uris.lv2_index, Atom((int32_t)index)); set_context(_context); @@ -88,7 +88,7 @@ PortImpl::~PortImpl() bool PortImpl::supports(const Raul::URI& value_type) const { - return has_property(Shared::LV2URIMap::instance().obj_supports, value_type); + return has_property(_bufs.uris().obj_supports, value_type); } @@ -227,7 +227,7 @@ PortImpl::broadcast_value(Context& context, bool force) break; case PortType::VALUE: case PortType::MESSAGE: - LV2Object::to_atom(((ObjectBuffer*)buffer(0).get())->object(), val); + LV2Object::to_atom(_bufs.uris(), ((ObjectBuffer*)buffer(0).get())->object(), val); break; } @@ -242,11 +242,11 @@ PortImpl::broadcast_value(Context& context, bool force) void PortImpl::set_context(Context::ID c) { - const LV2URIMap& uris = Shared::LV2URIMap::instance(); + const LV2URIMap& uris = _bufs.uris(); _context = c; switch (c) { case Context::AUDIO: - set_property(uris.ctx_context, uris.ctx_AudioContext); + remove_property(uris.ctx_context, uris.wildcard); break; case Context::MESSAGE: set_property(uris.ctx_context, uris.ctx_MessageContext); |