Mercurial > hg > beaglert
diff include/client.h @ 41:4255ecbb9bec ultra-staging
Timers to measure performances, ultra experimental
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Tue, 19 May 2015 16:41:07 +0100 |
parents | ad5cd8dd99b3 |
children | d3f869b98147 |
line wrap: on
line diff
--- a/include/client.h Wed May 13 12:23:37 2015 +0100 +++ b/include/client.h Tue May 19 16:41:07 2015 +0100 @@ -14,9 +14,18 @@ float *variables[16]; int numVariables; }; +#define NETWORK_AUDIO_BUFFER_SIZE 100 //1400/4 //maximum payload for a UDP datagram over ethernet is 1472 bytes, I leave some headroom and divide by 4 to get the number of floats +struct networkAudio{ + int timestamp; + int currentBuffer; + int index; + float buffers[2][NETWORK_AUDIO_BUFFER_SIZE]; + int doneOnTime; +}; void error(const char *); int setupSockets(int receivePort, int transmitPort, char const*serverName); int sendMessage(networkData message); +int sendAudio(networkAudio *audio); int receiveMessage(networkData message); void closeSockets();