aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/emphasis.h
blob: 283afb196f545eeec24b40c00e4c8c1be8be0ff6 (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 {
		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);