Created
April 11, 2016 22:13
-
-
Save MartinBspheroid/a8cd3653a257a7f7bebde9f4984c8ac4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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