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

54 lines
1.4 KiB
C
Raw Permalink Normal View History

2024-11-10 10:44:17 +00:00
#ifndef _AUDIO_VOICE_CHANGER_API_H_
#define _AUDIO_VOICE_CHANGER_API_H_
#include "media/voiceChanger_api.h"
#include "media/audio_stream.h"
typedef struct _voice_changer_hdl {
VOICECHANGER_FUNC_API *ops;
void *workbuf;
VOICECHANGER_PARM parm;
struct audio_stream_entry entry; // 音频流入口
struct list_head hentry; //
u32 sample_rate;
u32 voice_changer_name;
u8 update;
u8 status;
} voice_changer_hdl;
/*
* open时不传默认参数会使用内部默认参数
* open的返回句柄parm中
*/
extern VOICECHANGER_FUNC_API *get_voiceChanger_func_api();
/*
*
*/
voice_changer_hdl *audio_voice_changer_open(VOICECHANGER_PARM *param, u32 sample_rate, u32 voice_changer_name);
/*
*
*/
void audio_voice_changer_close(voice_changer_hdl *hdl);
/*
*
*/
void audio_voice_changer_update_parm(u32 voice_changer_name, VOICECHANGER_PARM *parm);
/*
*
*/
int audio_voice_changer_run(voice_changer_hdl *hdl, s16 *indata, s16 *outdata, int len, u8 ch_num);
/*
*
*/
void audio_voice_changer_bypass(u32 voice_changer_name, u32 bypass);
#endif
#ifndef RUN_NORMAL
#define RUN_NORMAL 0
#endif
#ifndef RUN_BYPASS
#define RUN_BYPASS 1
#endif