Mercurial > hg > beaglert
changeset 107:836052c86e1e
Updated Scope.h with ifdefs
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Tue, 18 Aug 2015 00:13:04 +0100 |
parents | 207a57538bb7 |
children | 3068421c0737 ad8a93cd7c39 09a32ca96255 |
files | include/Scope.h |
diffstat | 1 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/include/Scope.h Fri Aug 14 05:14:55 2015 +0100 +++ b/include/Scope.h Tue Aug 18 00:13:04 2015 +0100 @@ -4,7 +4,8 @@ #include <cmath> #include <UdpClient.h> -#define NETWORK_AUDIO_BUFFER_SIZE 400 +#define BUILD_FOR_UDPRECEIVE_PLUGIN +#define NETWORK_AUDIO_BUFFER_SIZE 302 struct networkAudio{ int timestamp; int currentBuffer; @@ -29,19 +30,23 @@ Scope(){ numChannels = NUM_SCOPE_CHANNELS; sampleCount = 0; - +#ifdef BUILD_FOR_UDPRECEIVE_PLUGIN + char server[]="192.168.7.1"; +#else + char server[]="127.0.0.1"; +#endif /* BUILD_FOR_UDPRECEIVE_PLUGIN */ + printf("Sending messages to : %s\n", server); for(int n=0; n<numChannels; n++){ channel[n].doneOnTime=1; channel[n].index=2; //leave space for the heading message (channel, timestamp) channel[n].timestamp=0; channel[n].currentBuffer=0; channel[n].toBeSent=false; + channel[n].udpClient.setServer(server); #ifdef BUILD_FOR_UDPRECEIVE_PLUGIN channel[n].udpClient.setPort(9999+n); - channel[n].udpClient.setServer("192.168.7.1"); #else channel[n].udpClient.setPort(9999); - channel[n].udpClient.setServer("127.0.0.1"); #endif /* BUILD_FOR_UDPRECEIVE_PLUGIN */ } }