You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
550 B

#include "../libfilter/iir_filter.h"
typedef struct emphasis {
struct {
iir_filter_t lp;
double x_last;
double factor;
double amp;
} p;
struct {
iir_filter_t hp;
double y_last;
double factor;
double amp;
} d;
} emphasis_t;
int init_emphasis(emphasis_t *state, int samplerate, double cut_off);
void pre_emphasis(emphasis_t *state, sample_t *samples, int num);
void de_emphasis(emphasis_t *state, sample_t *samples, int num);
void dc_filter(emphasis_t *state, sample_t *samples, int num);