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

48 lines
1.7 KiB
C
Raw Permalink Normal View History

2024-11-10 10:44:17 +00:00
#ifndef _AUDIO_LOUDNESS_EQ_API_H_
#define _AUDIO_LOUDNESS_EQ_API_H_
#include "media/audio_eq.h"
/*
*使eq实现eq总使能eq,eq
* */
typedef struct _equalloudness_open_parm {
u16 sr; //采样率
u8 ch_num; //通道数
u8 threadhold_vol; //触发等响度软件数字音量阈值
int (*vol_cb)(void); //该函数获取系统软件的数字音量
} loudness_open_parm;
#define LOUDNESS_THREADHOLD_VOL (15)
typedef struct _equalloudness_hdl {
struct audio_eq *loudness; //使用eq实现等响度 句柄
u16 loudness_timer; //定时查询是否需要触发等响度 timer
u8 loudness_en; //等响度使能
u8 prev_status; //记录模块上一状态
loudness_open_parm o_parm; //打开传入的参数
} loudness_hdl;
/*----------------------------------------------------------------------------*/
/**@brief audio_equal_loudness_open, 等响度 打开
@param *_parm: loudness_open_parm
@return
@note
*/
/*----------------------------------------------------------------------------*/
loudness_hdl *audio_equal_loudness_open(loudness_open_parm *parm);
/*----------------------------------------------------------------------------*/
/**@brief audio_equal_loudness_close 等响度关闭处理
@param _hdl:
@return 0: -1
@note
*/
/*----------------------------------------------------------------------------*/
int audio_equal_loudness_close(loudness_hdl *hdl);
#endif