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/client/PortModel.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/client/PortModel.cpp')
-rw-r--r-- | src/client/PortModel.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
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<ObjectModel> 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 |