From bc8d2ebccb48531c7d32d63c608561e495cbd7a3 Mon Sep 17 00:00:00 2001 From: mick grierson Date: Mon, 29 Jun 2015 16:01:29 +0100 Subject: updating examples --- .../ofxOsc/src/ofxOscParameterSync.cpp | 39 ---------------------- 1 file changed, 39 deletions(-) delete mode 100755 ofxMaxim/ofxMaximExample_0.8.4_OSX_Granular/ofxOsc/src/ofxOscParameterSync.cpp (limited to 'ofxMaxim/ofxMaximExample_0.8.4_OSX_Granular/ofxOsc/src/ofxOscParameterSync.cpp') diff --git a/ofxMaxim/ofxMaximExample_0.8.4_OSX_Granular/ofxOsc/src/ofxOscParameterSync.cpp b/ofxMaxim/ofxMaximExample_0.8.4_OSX_Granular/ofxOsc/src/ofxOscParameterSync.cpp deleted file mode 100755 index 2cf7a11..0000000 --- a/ofxMaxim/ofxMaximExample_0.8.4_OSX_Granular/ofxOsc/src/ofxOscParameterSync.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* - * ofxOscParameterSync.cpp - * - * Created on: 13/07/2012 - * Author: arturo - */ - -#include "ofxOscParameterSync.h" - -ofxOscParameterSync::ofxOscParameterSync() { - syncGroup = NULL; - updatingParameter = false; -} - -ofxOscParameterSync::~ofxOscParameterSync(){ - if(syncGroup) - ofRemoveListener(syncGroup->parameterChangedE,this,&ofxOscParameterSync::parameterChanged); -} - - -void ofxOscParameterSync::setup(ofParameterGroup & group, int localPort, string host, int remotePort){ - syncGroup = &group; - ofAddListener(group.parameterChangedE,this,&ofxOscParameterSync::parameterChanged); - sender.setup(host,remotePort); - receiver.setup(localPort); -} - -void ofxOscParameterSync::update(){ - if(receiver.hasWaitingMessages()){ - updatingParameter = true; - receiver.getParameter(*syncGroup); - updatingParameter = false; - } -} - -void ofxOscParameterSync::parameterChanged( ofAbstractParameter & parameter ){ - if(updatingParameter) return; - sender.sendParameter(parameter); -} -- cgit v1.3