Bela
Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
 All Classes Files Functions Variables Typedefs Macros Groups
Public Member Functions | List of all members
OscReceiver Class Reference

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, void *arg)> on_receive, void *callbackArg=nullptr)
 
void setup (int port, std::function< void(oscpkt::Message *msg, void *arg)> on_receive, void *callbackArg=nullptr)
 Initiliases OscReceiver. More...
 

Detailed Description

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/

Member Function Documentation

void OscReceiver::setup ( int  port,
std::function< void(oscpkt::Message *msg, void *arg)>  on_receive,
void *  callbackArg = nullptr 
)

Initiliases OscReceiver.

Must be called once during setup()

Parameters
portthe port number used to receive OSC messages
onreceivethe callback function which recevied OSC messages are passed to
callbackArgan argument to pass to the callback

The documentation for this class was generated from the following files: