-
Notifications
You must be signed in to change notification settings - Fork 0
/
meditrainer.h
executable file
·75 lines (53 loc) · 1.05 KB
/
meditrainer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#ifndef CUBE_H
#define CUBE_H
#include <nsutil.h>
#include <nsnet.h>
#include "esUtil.h"
/*
* Used by the modeedriver
*/
#define SAMPLESIZE 256
#define MINLINELENGTH 4
#define DELIMS " \r\n"
#define X_SIZE 256
#define ADC_RESOLUTION 1024
#define FFT_SCALE_FACTOR (1024*1024*10)
typedef struct
{
float avg;
unsigned int sampleBuf[2][SAMPLESIZE];
} THRDATA;
struct Options {
char hostname[MAXLEN];
unsigned short port;
char filename[MAXLEN];
int eegNum;
int isFilenameSet;
int isLimittedTime;
double seconds;
};
/*
* Used by opengl es
*/
#ifdef RPI_NO_X
#define SCREENWID 0
#define SCREENHEI 0
#else
#define SCREENWID 1024
#define SCREENHEI 768
#endif
#define NUM_MODES 5
typedef struct
{
// Handle to a program object
GLuint programs[NUM_MODES];
GLuint locGlobalTime[NUM_MODES];
GLuint locIChannel0[NUM_MODES];
GLuint locYOffset[NUM_MODES];
GLuint locIResolution[NUM_MODES];
void* thrdata_void_ptr;
struct timeval timeStart;
// Texture handle
GLuint textureId;
} UserData;
#endif // CUBE_H