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/client/PortModel.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/client/PortModel.cpp') diff --git a/src/client/PortModel.cpp b/src/client/PortModel.cpp index e23a0e1a..80934cad 100644 --- a/src/client/PortModel.cpp +++ b/src/client/PortModel.cpp @@ -28,7 +28,7 @@ PortModel::set_property(const Raul::URI& uri, const Raul::Atom& value) { Raul::Atom& ret = ObjectModel::set_property(uri, value); - if (uri == Shared::LV2URIMap::instance().ingen_value) + if (uri == _uris.ingen_value) this->value(value); return ret; } @@ -37,14 +37,14 @@ PortModel::set_property(const Raul::URI& uri, bool PortModel::supports(const Raul::URI& value_type) const { - return has_property(Shared::LV2URIMap::instance().obj_supports, value_type); + return has_property(_uris.obj_supports, value_type); } bool PortModel::port_property(const std::string& uri) const { - return has_property(Shared::LV2URIMap::instance().lv2_portProperty, Raul::URI(uri)); + return has_property(_uris.lv2_portProperty, Raul::URI(uri)); } @@ -65,5 +65,16 @@ PortModel::set(SharedPtr model) } +bool +PortModel::has_context(const Raul::URI& uri) +{ + const Raul::Atom& context = get_property(_uris.ctx_context); + if (uri == _uris.ctx_AudioContext && !context.is_valid()) + return true; + else + return context == uri; +} + + } // namespace Client } // namespace Ingen -- cgit v1.2.1