diff options
-rw-r--r-- | src/engine/OSCEngineReceiver.cpp | 21 | ||||
-rw-r--r-- | src/engine/OSCEngineReceiver.hpp | 10 |
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); |