Mercurial > hg > beaglert
diff core/Scope.cpp @ 474:efc9a9f8e63d prerelease
Libpd added scope support and example
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Mon, 20 Jun 2016 20:38:46 +0100 |
parents | 421a69d42943 |
children | 506a319c08cf |
line wrap: on
line diff
--- a/core/Scope.cpp Mon Jun 20 18:35:47 2016 +0100 +++ b/core/Scope.cpp Mon Jun 20 20:38:46 2016 +0100 @@ -20,9 +20,9 @@ sampleRate = _sampleRate; // setup the OSC server && client - // used for sending / recieving settings + // used for sending / receiving settings // oscClient has it's send task turned off, as we only need to send one handshake message - oscServer.setup(OSC_RECIEVE_PORT); + oscServer.setup(OSC_RECEIVE_PORT); oscClient.setup(OSC_SEND_PORT, "127.0.0.1", false); // setup the udp socket @@ -36,18 +36,18 @@ // send an OSC message to address /scope-setup // then wait 1 second for a reply on /scope-setup-reply - bool handshakeRecieved = false; + bool handshakeReceived = false; oscClient.sendMessageNow(oscClient.newMessage.to("/scope-setup").add((int)numChannels).add(sampleRate).end()); - oscServer.recieveMessageNow(1000); + oscServer.receiveMessageNow(1000); while (oscServer.messageWaiting()){ - if (handshakeRecieved){ + if (handshakeReceived){ parseMessage(oscServer.popMessage()); } else if (oscServer.popMessage().match("/scope-setup-reply")){ - handshakeRecieved = true; + handshakeReceived = true; } } - if (handshakeRecieved && connected) + if (handshakeReceived && connected) start(); } @@ -82,7 +82,7 @@ void Scope::log(float chn1, ...){ - // check for any recieved OSC messages + // check for any received OSC messages while (oscServer.messageWaiting()){ parseMessage(oscServer.popMessage()); }