aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/emphasis.h
blob: 235e3ce62c892bf33fca625c9c46c639de0c841c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
typedef struct emphasis {
	struct {
		double x_last;
		double factor;
		double amp;
	} p;
	struct {
		iir_filter_t hp;
		double y_last;
		double factor;
		double amp;
	} d;
} emphasis_t;

#define CUT_OFF_EMPHASIS_DEFAULT 300.0

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);