ogl_beamformer_lib.h (1265B)
1 /* See LICENSE for license details. */ 2 #include <stddef.h> 3 #include <stdint.h> 4 5 typedef char c8; 6 typedef uint8_t u8; 7 typedef int16_t i16; 8 typedef uint16_t u16; 9 typedef int32_t i32; 10 typedef uint32_t u32; 11 typedef uint32_t b32; 12 typedef uint64_t u64; 13 typedef float f32; 14 typedef double f64; 15 typedef ptrdiff_t size; 16 typedef ptrdiff_t iptr; 17 18 #if defined(_WIN32) 19 #define LIB_FN __declspec(dllexport) 20 #else 21 #define LIB_FN 22 #endif 23 24 typedef struct { f32 x, y; } v2; 25 typedef struct { f32 x, y, z, w; } v4; 26 typedef struct { u32 x, y; } uv2; 27 typedef struct { u32 x, y, z; } uv3; 28 typedef struct { u32 x, y, z, w; } uv4; 29 30 #include "../beamformer_parameters.h" 31 32 LIB_FN b32 set_beamformer_parameters(char *shm_name, BeamformerParameters *); 33 LIB_FN b32 set_beamformer_pipeline(char *shm_name, i32 *stages, i32 stages_count); 34 35 LIB_FN b32 send_data(char *pipe_name, char *shm_name, void *data, u32 data_size); 36 37 /* NOTE: sends data and waits for (complex) beamformed data to be returned. 38 * out_data: must be allocated by the caller as 2 f32s per output point. */ 39 LIB_FN b32 beamform_data_synchronized(char *pipe_name, char *shm_name, void *data, u32 data_size, 40 uv4 output_points, f32 *out_data, i32 timeout_ms);