summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-02-26 06:38:33 +0000
committerDavid Robillard <d@drobilla.net>2010-02-26 06:38:33 +0000
commitef3e95a930e0ac97cf12760150b93d18c6c0cbd8 (patch)
tree5436ab1e96a2ffa4c61f6c7416a3774265b32f02 /src
parentc85ffb74522ff3eb5e152073eaf4e0c6395a12c6 (diff)
downloadingen-ef3e95a930e0ac97cf12760150b93d18c6c0cbd8.tar.gz
ingen-ef3e95a930e0ac97cf12760150b93d18c6c0cbd8.tar.bz2
ingen-ef3e95a930e0ac97cf12760150b93d18c6c0cbd8.zip
Update stub support for liblo bundle handlers (for patch lo_bundle_receive_support_2.patch on liblo-devel 2008-02-26).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2507 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/engine/OSCEngineReceiver.cpp21
-rw-r--r--src/engine/OSCEngineReceiver.hpp10
2 files changed, 18 insertions, 13 deletions
diff --git a/src/engine/OSCEngineReceiver.cpp b/src/engine/OSCEngineReceiver.cpp
index 7d3adc5f..c8dd99ca 100644
--- a/src/engine/OSCEngineReceiver.cpp
+++ b/src/engine/OSCEngineReceiver.cpp
@@ -85,7 +85,7 @@ OSCEngineReceiver::OSCEngineReceiver(Engine& engine, size_t queue_size, uint16_t
lo_server_add_method(_server, NULL, NULL, set_response_address_cb, this);
#ifdef LIBLO_BUNDLES
- lo_server_add_bundle_handler(_server, bundle_cb, this);
+ lo_server_add_bundle_handlers(_server, bundle_start_cb, bundle_end_cb, this);
#endif
// Commands
@@ -232,16 +232,17 @@ OSCEngineReceiver::set_response_address_cb(const char* path, const char* types,
#ifdef LIBLO_BUNDLES
int
-OSCEngineReceiver::_bundle_cb(lo_bundle_edge edge)
+OSCEngineReceiver::_bundle_start_cb(lo_timetag time)
{
- switch (edge) {
- case LO_BUNDLE_BEGIN:
- info << "BUNDLE BEGIN" << endl;
- break;
- case LO_BUNDLE_END:
- info << "BUNDLE END" << endl;
- break;
- }
+ info << "BUNDLE START" << endl;
+ return 0;
+}
+
+
+int
+OSCEngineReceiver::_bundle_end_cb()
+{
+ info << "BUNDLE END" << endl;
return 0;
}
#endif
diff --git a/src/engine/OSCEngineReceiver.hpp b/src/engine/OSCEngineReceiver.hpp
index 9cbcd0c4..7bb4e1c9 100644
--- a/src/engine/OSCEngineReceiver.hpp
+++ b/src/engine/OSCEngineReceiver.hpp
@@ -78,11 +78,15 @@ private:
ReceiveThread* _receive_thread;
#ifdef LIBLO_BUNDLES
- static int bundle_cb(lo_bundle_edge edge, void* myself) {
- return ((OSCEngineReceiver*)myself)->_bundle_cb(edge);
+ static int bundle_start_cb(lo_timetag time, void* myself) {
+ return ((OSCEngineReceiver*)myself)->_bundle_start_cb(time);
+ }
+ static int bundle_end_cb(void* myself) {
+ return ((OSCEngineReceiver*)myself)->_bundle_end_cb();
}
- int _bundle_cb(lo_bundle_edge edge);
+ int _bundle_start_cb(lo_timetag time);
+ int _bundle_end_cb();
#endif
static void error_cb(int num, const char* msg, const char* path);