KT26-0607_AC695n-BTE-SDK312/include_lib/media/drc_pro_api.h
2026-06-07 19:38:16 +08:00

49 lines
1.4 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef DRC_PRO_API_H
#define DRC_PRO_API_H
#include "AudioEffect_DataType.h"
#ifdef WIN32
#define AT_DRC_PRO(x)
#define AT_DRC_PRO_CODE
#define AT_DRC_PRO_CONST
#define AT_DRC_PRO_SPARSE_CODE
#define AT_DRC_PRO_SPARSE_CONST
#else
#define AT_DRC_PRO(x) __attribute__((section(#x)))
#define AT_DRC_PRO_CODE AT_DRC_PRO(.drc_pro_code)
#define AT_DRC_PRO_CONST AT_DRC_PRO(.drc_pro_const)
#define AT_DRC_PRO_SPARSE_CODE AT_DRC_PRO(.drc_pro_sparse_code)
#define AT_DRC_PRO_SPARSE_CONST AT_DRC_PRO(.drc_pro_sparse_const)
#endif
struct drc_pro_param {
int channel;
int sample_rate;
float attack_time;
float release_time;
float compress_attack_time;
float compress_release_time;
float rms_time;
float detect_time;
float input_gain;
float output_gain;
int threshold_num;
unsigned char algorithm; // PEAK或者RMS
unsigned char mode; // 模式
unsigned char reverved[2];
int reverved1[4];
float *threshold;
af_DataType pcm_info;
};
int need_drc_pro_buf(struct drc_pro_param *param); // bufsize 与 algorithmrmsTime channel、 sampleRate有关
int drc_pro_init(void *work_buf, struct drc_pro_param *param);
int drc_pro_update(void *work_buf, struct drc_pro_param *param);
int drc_pro_run(void *work_buf, void *indata, void *outdata, int per_channel_npoint);
#endif // !DRC_PRO_API_H