common: Add pre and de emphasis, if the radio does not support it
Connect to the oscillator of the transmitter - good girl! You need to enable pre emphasis in this case. Connect to the discriminator of the receiver - good boy! You need to enable de emphasis in this case.
This commit is contained in:
17
src/common/emphasis.h
Normal file
17
src/common/emphasis.h
Normal file
@@ -0,0 +1,17 @@
|
||||
typedef struct emphasis {
|
||||
struct {
|
||||
double last_value;
|
||||
double factor;
|
||||
double amp;
|
||||
} p;
|
||||
struct {
|
||||
double last_value;
|
||||
double factor;
|
||||
double amp;
|
||||
} d;
|
||||
} emphasis_t;
|
||||
|
||||
int init_emphasis(emphasis_t *state, int samplerate);
|
||||
void pre_emphasis(emphasis_t *state, int16_t *samples, int num);
|
||||
void de_emphasis(emphasis_t *state, int16_t *samples, int num);
|
||||
|
Reference in New Issue
Block a user