summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/engine/OSCEngineReceiver.cpp30
-rw-r--r--src/engine/OSCEngineReceiver.hpp9
-rw-r--r--wscript5
3 files changed, 40 insertions, 4 deletions
diff --git a/src/engine/OSCEngineReceiver.cpp b/src/engine/OSCEngineReceiver.cpp
index 38ef3273..4f7f0ebe 100644
--- a/src/engine/OSCEngineReceiver.cpp
+++ b/src/engine/OSCEngineReceiver.cpp
@@ -84,6 +84,10 @@ OSCEngineReceiver::OSCEngineReceiver(Engine& engine, size_t queue_size, uint16_t
// It's important this is first and returns nonzero.
lo_server_add_method(_server, NULL, NULL, set_response_address_cb, this);
+#ifdef LIBLO_BUNDLES
+ lo_server_add_bundle_handler(_server, bundle_cb, this);
+#endif
+
// Commands
lo_server_add_method(_server, "/ping", "i", ping_cb, this);
lo_server_add_method(_server, "/ping_queued", "i", ping_slow_cb, this);
@@ -228,10 +232,31 @@ OSCEngineReceiver::set_response_address_cb(const char* path, const char* types,
}
+#ifdef LIBLO_BUNDLES
+int
+OSCEngineReceiver::_bundle_cb(lo_bundle_edge edge)
+{
+ switch (edge) {
+ case LO_BUNDLE_BEGIN:
+ info << "BUNDLE BEGIN" << endl;
+ break;
+ case LO_BUNDLE_END:
+ info << "BUNDLE END" << endl;
+ break;
+ }
+ return 0;
+}
+#endif
+
+
void
OSCEngineReceiver::error_cb(int num, const char* msg, const char* path)
{
- error << "liblo server error " << num << " for path `" << path << "' (" << msg << ")" << endl;
+ error << "liblo server error" << num;
+ if (path) {
+ error << " for path `" << path << "'";
+ }
+ error << " (" << msg << ")" << endl;
}
@@ -582,9 +607,6 @@ OSCEngineReceiver::_set_property_cb(const char* path, const char* types, lo_arg*
const char* object_path = &argv[1]->s;
const char* key = &argv[2]->s;
- cout << "SET PROPERTY " << object_path << " : " << key << " PENDING: " <<
- lo_server_events_pending(_server) << endl;
-
Raul::Atom value = Raul::AtomLiblo::lo_arg_to_atom(types[3], argv[3]);
set_property(object_path, key, value);
diff --git a/src/engine/OSCEngineReceiver.hpp b/src/engine/OSCEngineReceiver.hpp
index 7279913f..168d411a 100644
--- a/src/engine/OSCEngineReceiver.hpp
+++ b/src/engine/OSCEngineReceiver.hpp
@@ -22,6 +22,7 @@
#include <lo/lo.h>
#include "QueuedEngineInterface.hpp"
#include "Request.hpp"
+#include "ingen-config.h"
namespace Ingen {
@@ -76,6 +77,14 @@ private:
ReceiveThread* _receive_thread;
+#ifdef LIBLO_BUNDLES
+ static int bundle_cb(lo_bundle_edge edge, void* myself) {
+ return ((OSCEngineReceiver*)myself)->_bundle_cb(edge);
+ }
+
+ int _bundle_cb(lo_bundle_edge edge);
+#endif
+
static void error_cb(int num, const char* msg, const char* path);
static int set_response_address_cb(LO_HANDLER_ARGS, void* myself);
static int generic_cb(LO_HANDLER_ARGS, void* myself);
diff --git a/wscript b/wscript
index a8100bfc..e6b50df6 100644
--- a/wscript
+++ b/wscript
@@ -28,6 +28,8 @@ def set_options(opt):
help="Do not build HTTP via libsoup support, even if libsoup exists")
opt.add_option('--log-debug', action='store_true', default=False, dest='log_debug',
help="Print debugging output")
+ opt.add_option('--liblo-bundles', action='store_true', default=False, dest='liblo_bundles',
+ help="Use liblo bundle support (experimental, requires patched liblo)")
def configure(conf):
autowaf.configure(conf)
@@ -75,6 +77,9 @@ def configure(conf):
if Options.options.log_debug:
conf.define('LOG_DEBUG', 1)
+
+ if Options.options.liblo_bundles:
+ conf.define('LIBLO_BUNDLES', 1)
conf.write_config_header('ingen-config.h')