osmocom-analog/src/common/compander.h

22 lines
513 B
C
Raw Normal View History

2016-03-13 15:18:42 +00:00
typedef struct compander {
2016-04-23 12:33:02 +00:00
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;
2016-03-13 15:18:42 +00:00
} compander_t;
2016-04-23 12:33:02 +00:00
void init_compander(compander_t *state, int samplerate, double attack_ms, double recovery_ms, int unaffected_level);
2016-03-13 15:18:42 +00:00
void compress_audio(compander_t *state, int16_t *samples, int num);
void expand_audio(compander_t *state, int16_t *samples, int num);