Instantly share code, notes, and snippets.

Embed
What would you like to do?
void OSC_TestApp::setupReciever(int portNum)
{
if (mReciever)
{
mReciever->close();
mReciever.release();
mReciever = make_unique<osc::ReceiverUdp>(portNum);
} else
{
mReciever = make_unique<osc::ReceiverUdp>(portNum);
}
mReciever->setListener("*",[&](const osc::Message& msg)
{
adress = msg.getAddress();
for (int i = 0; i < msg.getNumArgs(); ++i)
{
console() << adress + "\t" << msg.getArgFloat(i) << endl;
}
});
mReciever->bind();
mReciever->listen();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment