Bela
Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
Loading...
Searching...
No Matches
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, 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.

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/

Examples
Communication/OSC/render.cpp.

Member Function Documentation

◆ setup()

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()

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

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