blob: ff2e84489bbbfe06debdea91f55d2ae850a0018d (
plain) (
blame)
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
|
#ifndef AUDIOBEAM_MAIN_H
#define AUDIOBEAM_MAIN_H
struct audiobeam_DataQueue {
float **sample_queue;
int head;
int tail;
unsigned char full;
};
struct audiobeam_Delays {
float **delay_values;
long int max_delay;
};
struct audiobeam_PreprocessedDelays {
float delay;
int low;
int high;
float offset;
};
#undef FLT_MAX
#define FLT_MAX 999e999
#define SOUND_SPEED 342
#define SAMPLING_RATE 16000
#define CARTESIAN_DISTANCE(x1,y1,z1,x2,y2,z2) (sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)+(z1-z2)*(z1-z2)));
#define NUM_MIC 15
#define ANGLE_ENERGY_WINDOW_SIZE 400
#define GRID_STEP_SIZE 0.003 // .3cm
#define NUM_DIRS 7
#define NUM_TILES 16
#define MIC_HORIZ_SPACE 0.038257
#define MIC_VERT_SPACE 0.015001
#define TWO23 8388608.0 // 2^23
#define BUFFER_SIZE 384 // No of input-tupels (each with NUM_MIC elements)
#define NUM_MIC_IN_CHAIN 32
#define NUM_BOARDS_IN_CHAIN 16
#define INPUT_LENGTH 5760
#define INTERPOLATE(low_value, high_value, offset) (((high_value-low_value)*(offset)) + low_value)
#endif
|