aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/compander.h
blob: 53d19675d9cc26f5d15d7a484809f9748dd89834 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
typedef struct compander {
	struct {
		double	unaffected;
		double	step_up;
		double	step_down;
		double	peak;
		double	envelope;
	} c;
	struct {
		double	unaffected;
		double	step_up;
		double	step_down;
		double	peak;
		double	envelope;
	} e;
} compander_t;

void init_compander(compander_t *state, int samplerate, double attack_ms, double recovery_ms, int unaffected_level);
void compress_audio(compander_t *state, int16_t *samples, int num);
void expand_audio(compander_t *state, int16_t *samples, int num);