forked from martinmarinov/TempestSDR
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTSDRLibrary.h
More file actions
34 lines (29 loc) · 1.01 KB
/
Copy pathTSDRLibrary.h
File metadata and controls
34 lines (29 loc) · 1.01 KB
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
#ifndef _TSDRLibrary
#define _TSDRLibrary
#include <stdint.h>
struct tsdr_lib {
void * plugin;
void * mutex_sync_unload;
void * mutex_video_stopped;
uint32_t samplerate;
double sampletime;
int width;
int height;
double pixelrate;
double pixeltime;
double pixeltimeoversampletime;
volatile int running;
volatile int nativerunning;
int frames_to_average;
} typedef tsdr_lib_t;
typedef void(*tsdr_readasync_function)(float *buf, int width, int height, void *ctx);
void tsdr_init(tsdr_lib_t * tsdr);
int tsdr_setsamplerate(tsdr_lib_t * tsdr, uint32_t rate);
int tsdr_setbasefreq(tsdr_lib_t * tsdr, uint32_t freq);
int tsdr_stop(tsdr_lib_t * tsdr);
int tsdr_setgain(tsdr_lib_t * tsdr, float gain);
int tsdr_readasync(tsdr_lib_t * tsdr, const char * pluginfilepath, tsdr_readasync_function cb, void *, const char * params);
int tsdr_unloadplugin(tsdr_lib_t * tsdr);
int tsdr_setresolution(tsdr_lib_t * tsdr, int width, int height, double refreshrate);
int tsdr_isrunning(tsdr_lib_t * tsdr);
#endif