diff options
author | David Robillard <d@drobilla.net> | 2006-10-15 20:46:26 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-10-15 20:46:26 +0000 |
commit | 4174fb8f94139e0a38da150ffb0874b636497dfe (patch) | |
tree | 7170dd4b13ee0fe42c67aeabeef3f95437f146b2 /src/libs/client | |
parent | 14542a4634cb211be5bdf590574ae3b8e1715486 (diff) | |
download | ingen-4174fb8f94139e0a38da150ffb0874b636497dfe.tar.gz ingen-4174fb8f94139e0a38da150ffb0874b636497dfe.tar.bz2 ingen-4174fb8f94139e0a38da150ffb0874b636497dfe.zip |
Fixed feedback problems (CPU chewing) with port controls.
git-svn-id: http://svn.drobilla.net/lad/ingen@176 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client')
-rw-r--r-- | src/libs/client/OSCClientReceiver.cpp | 2 | ||||
-rw-r--r-- | src/libs/client/OSCClientReceiver.h | 4 | ||||
-rw-r--r-- | src/libs/client/SigClientInterface.h | 4 | ||||
-rw-r--r-- | src/libs/client/ThreadedSigClientInterface.cpp | 3 | ||||
-rw-r--r-- | src/libs/client/ThreadedSigClientInterface.h | 7 |
5 files changed, 18 insertions, 2 deletions
diff --git a/src/libs/client/OSCClientReceiver.cpp b/src/libs/client/OSCClientReceiver.cpp index eb320df0..14bff1f1 100644 --- a/src/libs/client/OSCClientReceiver.cpp +++ b/src/libs/client/OSCClientReceiver.cpp @@ -67,7 +67,7 @@ OSCClientReceiver::start() } // Print all incoming messages - //lo_server_thread_add_method(_st, NULL, NULL, generic_cb, NULL); + lo_server_thread_add_method(_st, NULL, NULL, generic_cb, NULL); //lo_server_thread_add_method(_st, "/om/response/ok", "i", om_response_ok_cb, this); //lo_server_thread_add_method(_st, "/om/response/error", "is", om_responseerror_cb, this); diff --git a/src/libs/client/OSCClientReceiver.h b/src/libs/client/OSCClientReceiver.h index 287f5e45..57faec77 100644 --- a/src/libs/client/OSCClientReceiver.h +++ b/src/libs/client/OSCClientReceiver.h @@ -60,6 +60,10 @@ public: OSCClientReceiver(int listen_port); ~OSCClientReceiver(); + // Engine side only + //void enable() {} + //void disable() {} + void start(); void stop(); diff --git a/src/libs/client/SigClientInterface.h b/src/libs/client/SigClientInterface.h index 4639bdc7..9f8a4537 100644 --- a/src/libs/client/SigClientInterface.h +++ b/src/libs/client/SigClientInterface.h @@ -67,6 +67,10 @@ protected: // ClientInterface hooks that fire the above signals + // FIXME: implement for this (is implemented for ThreadedSigClientInterface) + void enable() { } + void disable() { } + void bundle_begin() {} void bundle_end() {} diff --git a/src/libs/client/ThreadedSigClientInterface.cpp b/src/libs/client/ThreadedSigClientInterface.cpp index 28719598..bbe336a6 100644 --- a/src/libs/client/ThreadedSigClientInterface.cpp +++ b/src/libs/client/ThreadedSigClientInterface.cpp @@ -27,6 +27,9 @@ namespace Client { void ThreadedSigClientInterface::push_sig(Closure ev) { + if (!_enabled) + return; + bool success = false; bool first = true; diff --git a/src/libs/client/ThreadedSigClientInterface.h b/src/libs/client/ThreadedSigClientInterface.h index 056540fb..57afd0fa 100644 --- a/src/libs/client/ThreadedSigClientInterface.h +++ b/src/libs/client/ThreadedSigClientInterface.h @@ -44,7 +44,8 @@ class ThreadedSigClientInterface : public SigClientInterface { public: ThreadedSigClientInterface(uint32_t queue_size) - : _sigs(queue_size) + : _enabled(true) + , _sigs(queue_size) , response_slot(response_sig.make_slot()) , error_slot(error_sig.make_slot()) , new_plugin_slot(new_plugin_sig.make_slot()) @@ -64,6 +65,8 @@ public: , program_remove_slot(program_remove_sig.make_slot()) {} + void enable() { _enabled = true; } + void disable() { _enabled = false ; } // FIXME: make this insert bundle-boundary-events, where the GTK thread // process all events between start and finish in one cycle, guaranteed @@ -133,6 +136,8 @@ public: private: void push_sig(Closure ev); + bool _enabled; + Queue<Closure> _sigs; uint32_t _num_plugins; |