diff options
author | David Robillard <d@drobilla.net> | 2007-09-20 02:43:59 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-09-20 02:43:59 +0000 |
commit | 8e747504412c62f27c599f3f5e001ff3e2e36a82 (patch) | |
tree | 78c96ae09ae1c3c52ccdee28dbf0851651d3c3c9 /src/libs/client | |
parent | ed782b485becdaa2db064adaa00f1ffcd4880c26 (diff) | |
download | ingen-8e747504412c62f27c599f3f5e001ff3e2e36a82.tar.gz ingen-8e747504412c62f27c599f3f5e001ff3e2e36a82.tar.bz2 ingen-8e747504412c62f27c599f3f5e001ff3e2e36a82.zip |
Fix voice-specific polyphony controls.
Restore patch polyphony correctly on client reattach.
Fix crash on multiple polyphony changes w/ LV2 plugins.
git-svn-id: http://svn.drobilla.net/lad/ingen@737 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client')
-rw-r--r-- | src/libs/client/OSCClientReceiver.cpp | 9 | ||||
-rw-r--r-- | src/libs/client/OSCClientReceiver.hpp | 1 | ||||
-rw-r--r-- | src/libs/client/PatchModel.hpp | 3 |
3 files changed, 12 insertions, 1 deletions
diff --git a/src/libs/client/OSCClientReceiver.cpp b/src/libs/client/OSCClientReceiver.cpp index c369db0e..d6ce3f81 100644 --- a/src/libs/client/OSCClientReceiver.cpp +++ b/src/libs/client/OSCClientReceiver.cpp @@ -152,6 +152,7 @@ OSCClientReceiver::setup_callbacks() lo_server_thread_add_method(_st, "/ingen/destroyed", "s", destroyed_cb, this); lo_server_thread_add_method(_st, "/ingen/patch_enabled", "s", patch_enabled_cb, this); lo_server_thread_add_method(_st, "/ingen/patch_disabled", "s", patch_disabled_cb, this); + lo_server_thread_add_method(_st, "/ingen/patch_polyphony", "si", patch_polyphony_cb, this); lo_server_thread_add_method(_st, "/ingen/patch_cleared", "s", patch_cleared_cb, this); lo_server_thread_add_method(_st, "/ingen/object_renamed", "ss", object_renamed_cb, this); lo_server_thread_add_method(_st, "/ingen/new_connection", "ss", connection_cb, this); @@ -211,6 +212,14 @@ OSCClientReceiver::_patch_disabled_cb(const char* path, const char* types, lo_ar int +OSCClientReceiver::_patch_polyphony_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) +{ + patch_polyphony((const char*)&argv[0]->s, argv[1]->i); + return 0; +} + + +int OSCClientReceiver::_patch_cleared_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) { patch_cleared((const char*)&argv[0]->s); diff --git a/src/libs/client/OSCClientReceiver.hpp b/src/libs/client/OSCClientReceiver.hpp index 41669662..4c036ebf 100644 --- a/src/libs/client/OSCClientReceiver.hpp +++ b/src/libs/client/OSCClientReceiver.hpp @@ -93,6 +93,7 @@ private: LO_HANDLER(destroyed); LO_HANDLER(patch_enabled); LO_HANDLER(patch_disabled); + LO_HANDLER(patch_polyphony); LO_HANDLER(patch_cleared); LO_HANDLER(object_renamed); LO_HANDLER(connection); diff --git a/src/libs/client/PatchModel.hpp b/src/libs/client/PatchModel.hpp index 77b597d5..21e89cee 100644 --- a/src/libs/client/PatchModel.hpp +++ b/src/libs/client/PatchModel.hpp @@ -69,6 +69,7 @@ public: sigc::signal<void, SharedPtr<ConnectionModel> > signal_removed_connection; sigc::signal<void> signal_enabled; sigc::signal<void> signal_disabled; + sigc::signal<void, uint32_t> signal_polyphony; sigc::signal<void, bool> signal_editable; private: @@ -83,7 +84,7 @@ private: } void filename(const string& f) { _filename = f; } - void poly(size_t p) { _poly = p; } + void poly(size_t p) { _poly = p; signal_polyphony.emit(p); } void enable(); void disable(); void clear(); |