Bela
Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
|
OscReceiver provides functions for receiving OSC messages in Bela. More...
#include <OscReceiver.h>
Public Member Functions | |
OscReceiver (int port, std::function< void(oscpkt::Message *msg, const char *addr, void *arg)> on_receive, void *callbackArg=nullptr) | |
void | setup (int port, std::function< void(oscpkt::Message *msg, const char *addr, void *arg)> on_receive, void *callbackArg=nullptr) |
Initiliases OscReceiver. More... | |
OscReceiver provides functions for receiving OSC messages in Bela.
When an OSC message is received over UDP on the port number passed to OscReceiver::setup() it is passed in the form of an oscpkt::Message to the onreceive callback. This callback, which must be passed to OscReceiver::setup() by the user, is run off the audio thread at non-realtime priority.
For documentation of oscpkt see http://gruntthepeon.free.fr/oscpkt/
void OscReceiver::setup | ( | int | port, |
std::function< void(oscpkt::Message *msg, const char *addr, void *arg)> | on_receive, | ||
void * | callbackArg = nullptr |
||
) |
Initiliases OscReceiver.
Must be called once during setup()
port | the port number used to receive OSC messages |
on_receive | the callback function which received OSC messages are passed to |
callbackArg | an argument to pass to the callback |