2016-04-23 16:50:11 +00:00
|
|
|
typedef struct emphasis {
|
|
|
|
struct {
|
2016-05-11 16:42:22 +00:00
|
|
|
double x_last;
|
2016-04-23 16:50:11 +00:00
|
|
|
double factor;
|
|
|
|
double amp;
|
|
|
|
} p;
|
|
|
|
struct {
|
2017-01-28 07:02:11 +00:00
|
|
|
filter_t hp;
|
2016-05-11 16:42:22 +00:00
|
|
|
double y_last;
|
2017-01-28 07:02:11 +00:00
|
|
|
double factor;
|
2016-04-23 16:50:11 +00:00
|
|
|
double amp;
|
|
|
|
} d;
|
|
|
|
} emphasis_t;
|
|
|
|
|
2017-01-28 07:02:11 +00:00
|
|
|
#define CUT_OFF_EMPHASIS_DEFAULT 300.0
|
2016-10-23 06:46:05 +00:00
|
|
|
|
|
|
|
int init_emphasis(emphasis_t *state, int samplerate, double cut_off);
|
2017-01-27 15:57:34 +00:00
|
|
|
void pre_emphasis(emphasis_t *state, double *samples, int num);
|
|
|
|
void de_emphasis(emphasis_t *state, double *samples, int num);
|
2016-04-23 16:50:11 +00:00
|
|
|
|