From 386b7d3366f1359a265da207a9cafa3edf553b64 Mon Sep 17 00:00:00 2001 From: Joshua Bakita Date: Mon, 7 Oct 2019 19:13:39 -0400 Subject: Reorganize and commit all the modified TACLeBench code and run scripts --- all_pairs/source/audiobeam/audiobeam.h | 50 ++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 all_pairs/source/audiobeam/audiobeam.h (limited to 'all_pairs/source/audiobeam/audiobeam.h') diff --git a/all_pairs/source/audiobeam/audiobeam.h b/all_pairs/source/audiobeam/audiobeam.h new file mode 100644 index 0000000..ff2e844 --- /dev/null +++ b/all_pairs/source/audiobeam/audiobeam.h @@ -0,0 +1,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 + -- cgit v1.2.2