Mercurial > hg > beaglert
comparison 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 |
comparison
equal
deleted
inserted
replaced
40:419ce4ebfc4c | 41:4255ecbb9bec |
---|---|
12 struct networkData{ | 12 struct networkData{ |
13 int *counter; | 13 int *counter; |
14 float *variables[16]; | 14 float *variables[16]; |
15 int numVariables; | 15 int numVariables; |
16 }; | 16 }; |
17 #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 | |
18 struct networkAudio{ | |
19 int timestamp; | |
20 int currentBuffer; | |
21 int index; | |
22 float buffers[2][NETWORK_AUDIO_BUFFER_SIZE]; | |
23 int doneOnTime; | |
24 }; | |
17 | 25 |
18 void error(const char *); | 26 void error(const char *); |
19 int setupSockets(int receivePort, int transmitPort, char const*serverName); | 27 int setupSockets(int receivePort, int transmitPort, char const*serverName); |
20 int sendMessage(networkData message); | 28 int sendMessage(networkData message); |
29 int sendAudio(networkAudio *audio); | |
21 int receiveMessage(networkData message); | 30 int receiveMessage(networkData message); |
22 void closeSockets(); | 31 void closeSockets(); |