KT24-1110_65E-HA-651B/include_lib/media/audio_howling.h

58 lines
1.9 KiB
C
Raw Normal View History

2024-11-10 10:44:17 +00:00
#ifndef _AUDIO_HOWLING_API_H
#define _AUDIO_HOWLING_API_H
#include "media/howling_api.h"
#define TRAP_MODE 0
#define SHIFT_PITCH_MODE 1
#define PEMAFROW_MODE 2
#define SHIFT_PHASE_MODE 3
#define HOWLING_MODE SHIFT_PITCH_MODE
#if (HOWLING_MODE == TRAP_MODE)
#define REVERB_RUN_POINT_NUM 160 //固定160个点
#elif (HOWLING_MODE == SHIFT_PHASE_MODE) //
#define REVERB_RUN_POINT_NUM 256 //固定256个点
#elif (HOWLING_MODE == PEMAFROW_MODE)
#define REVERB_RUN_POINT_NUM 128 //固定128
#else
#define REVERB_RUN_POINT_NUM 0 //无限制
#endif
/*----------------------------------------------------------------------------*/
/**@brief 啸叫抑制模块打开
@param howl_para: ,pemafrow模式为DAC输出数据buf
sample_rate:
channels:
mode: 0 1 2 pemafrow模式
@return
@note 160pemafrow 128
使,
const int config_howling_enable_pemafrow_mode = 1;
const int config_howling_enable_trap_mode = 1;
const int config_howling_enable_pitchps_mode = 1;
*/
/*----------------------------------------------------------------------------*/
HOWLING_API_STRUCT *open_howling(void *howl_para, u16 sample_rate, u8 channel, u8 mode);
/*
*
*/
void run_howling(HOWLING_API_STRUCT *howling_hdl, short *in, short *out, int len);
/*
*
*/
void close_howling(HOWLING_API_STRUCT *holing_hdl);
/*
*
*/
void pause_howling(HOWLING_API_STRUCT *holing_hdl, u8 run_mark);
void howling_update_bypass(HOWLING_API_STRUCT *hdl, u8 bypass);
void update_howling_parm(HOWLING_API_STRUCT *howling_hdl, void *parm);
#endif