From cfbcb812e96b740e16510bf736cef688d8ebe986 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 19 Sep 2007 06:29:58 +0000 Subject: Fix LV2 dynamic poly crash. Update client-side patch model on polyphony change. git-svn-id: http://svn.drobilla.net/lad/ingen@726 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/client/Store.cpp | 10 ++++++++++ src/libs/client/Store.hpp | 1 + 2 files changed, 11 insertions(+) (limited to 'src/libs/client') diff --git a/src/libs/client/Store.cpp b/src/libs/client/Store.cpp index 75eb943b..84528d00 100644 --- a/src/libs/client/Store.cpp +++ b/src/libs/client/Store.cpp @@ -44,6 +44,7 @@ Store::Store(SharedPtr engine, SharedPtr em emitter->new_port_sig.connect(sigc::mem_fun(this, &Store::new_port_event)); emitter->patch_enabled_sig.connect(sigc::mem_fun(this, &Store::patch_enabled_event)); emitter->patch_disabled_sig.connect(sigc::mem_fun(this, &Store::patch_disabled_event)); + emitter->patch_polyphony_sig.connect(sigc::mem_fun(this, &Store::patch_polyphony_event)); emitter->patch_cleared_sig.connect(sigc::mem_fun(this, &Store::patch_cleared_event)); emitter->connection_sig.connect(sigc::mem_fun(this, &Store::connection_event)); emitter->disconnection_sig.connect(sigc::mem_fun(this, &Store::disconnection_event)); @@ -451,6 +452,15 @@ Store::patch_disabled_event(const Path& path) patch->disable(); } + +void +Store::patch_polyphony_event(const Path& path, uint32_t poly) +{ + SharedPtr patch = PtrCast(object(path)); + if (patch) + patch->poly(poly); +} + void Store::patch_cleared_event(const Path& path) diff --git a/src/libs/client/Store.hpp b/src/libs/client/Store.hpp index 25398eaa..e5309484 100644 --- a/src/libs/client/Store.hpp +++ b/src/libs/client/Store.hpp @@ -99,6 +99,7 @@ private: void new_port_event(const Path& path, const string& data_type, bool is_output); void patch_enabled_event(const Path& path); void patch_disabled_event(const Path& path); + void patch_polyphony_event(const Path& path, uint32_t poly); void patch_cleared_event(const Path& path); void metadata_update_event(const Path& subject_path, const string& predicate, const Atom& value); void control_change_event(const Path& port_path, float value); -- cgit v1.2.1