1 /* 2 * Copyright (C) 2015-2020 Alibaba Group Holding Limited 3 */ 4 #ifndef __AUDIO_DRC2_H__ 5 #define __AUDIO_DRC2_H__ 6 7 #include <stdint.h> 8 9 #define MAX_LOOK_AHEAD_TIME (10) 10 11 typedef struct { 12 int knee; 13 int look_ahead_time; 14 int threshold; 15 float makeup_gain; 16 int ratio; 17 int attack_time; 18 int release_time; 19 } DRC2_CFG_T; 20 21 #ifdef __cplusplus 22 extern "C" { 23 #endif 24 25 void audio_drc2_open(int sample_rate, int sample_bits, int ch_num); 26 void audio_drc2_close(void); 27 void audio_drc2_process(uint8_t *buf_p_l, uint8_t *buf_p_r, uint32_t pcm_len); 28 void audio_drc2_set_cfg(const DRC2_CFG_T *cfg); 29 30 31 #ifdef __cplusplus 32 } 33 #endif 34 35 #endif 36