diff options
author | David Robillard <d@drobilla.net> | 2010-02-20 21:52:36 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-02-20 21:52:36 +0000 |
commit | 46e5de590817756b21a7a5d99bd4963df343f455 (patch) | |
tree | 7d7b3b63297b24d84e5b42cc8aeb22d4212738b5 /src/client/PatchModel.cpp | |
parent | b96a4015ae39b5bdd9afbd82898c0168a0a8e613 (diff) | |
download | ingen-46e5de590817756b21a7a5d99bd4963df343f455.tar.gz ingen-46e5de590817756b21a7a5d99bd4963df343f455.tar.bz2 ingen-46e5de590817756b21a7a5d99bd4963df343f455.zip |
Heavy overhaul of buffer management and polyphony.
* Working polyphony when nodes are instantiated at desired polyphony
level (dynamic still doesn't work)
* Use shared silent buffer for disconnected audio inputs (save memory)
* Eliminate redundant patch compiling on delete and disconnect-all
events that have child events
* Fix a ton of crash bugs and other issues I've since forgotten
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2468 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/client/PatchModel.cpp')
-rw-r--r-- | src/client/PatchModel.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/client/PatchModel.cpp b/src/client/PatchModel.cpp index 7d44eb1c..bf4168d6 100644 --- a/src/client/PatchModel.cpp +++ b/src/client/PatchModel.cpp @@ -169,22 +169,19 @@ PatchModel::enabled() const } -Raul::Atom& -PatchModel::set_meta_property(const Raul::URI& key, const Atom& value) +uint32_t +PatchModel::internal_poly() const { - if (key == Shared::LV2URIMap::instance().ingen_polyphony) - _poly = value.get_int32(); - - return NodeModel::set_meta_property(key, value); + const Raul::Atom& poly = get_property(Shared::LV2URIMap::instance().ingen_polyphony); + return poly.is_valid() ? poly.get_int32() : 1; } bool PatchModel::polyphonic() const { - return (_parent) - ? (_poly > 1) && _poly == PtrCast<PatchModel>(_parent)->poly() && _poly > 1 - : (_poly > 1); + const Raul::Atom& poly = get_property(Shared::LV2URIMap::instance().ingen_polyphonic); + return poly.is_valid() && poly.get_bool(); } |