summaryrefslogtreecommitdiffstats
path: root/src/libs/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/client')
-rw-r--r--src/libs/client/OSCClientReceiver.cpp2
-rw-r--r--src/libs/client/OSCClientReceiver.h4
-rw-r--r--src/libs/client/SigClientInterface.h4
-rw-r--r--src/libs/client/ThreadedSigClientInterface.cpp3
-rw-r--r--src/libs/client/ThreadedSigClientInterface.h7
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;