Ooh - in fact it now appears to be causing a segmentation fault:
*** [runide] Error 139
This is the complete code:
#include <Bela.h>
#include <OSCServer.h>
#include <OSCClient.h>
OSCServer oscServer;
OSCClient oscClient;
int localPort = 7562;
int remotePort = 6448;
const char* remoteIp = "192.168.7.1";
int gAudioFramesPerAnalogFrame;
bool setup(BelaContext *context, void *userData)
{
gAudioFramesPerAnalogFrame = context->audioFrames / context->analogFrames;
//oscServer.setup(localPort); //this is not actually needed if you do not need to receive messages
oscClient.setup(remotePort, remoteIp);
return true;
}
void render(BelaContext *context, void *userData)
{
for (unsigned int n = 0; n < context->audioFrames; n++)
{
if(!(n % gAudioFramesPerAnalogFrame))
{
oscClient.queueMessage(oscClient.newMessage.to("/wek/inputs").end());
}
}
}
void cleanup(BelaContext *context, void *userData)
{
}