Files
osmocom-analog/src/common/compandor.h
Andreas Eversberg 7ea3bc188d Move samples of int16_t format to sample_t, that is of type double
This prepares the correction of all levels
2017-02-18 21:01:08 +01:00

22 lines
515 B
C

typedef struct compandor {
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;
} compandor_t;
void init_compandor(compandor_t *state, int samplerate, double attack_ms, double recovery_ms, int unaffected_level);
void compress_audio(compandor_t *state, sample_t *samples, int num);
void expand_audio(compandor_t *state, sample_t *samples, int num);