TuyaOS
宏定义 | 枚举 | 函数
tal_audio.h 文件参考

Common process - the audio api 更多...

#include "tkl_audio.h"
tal_audio.h 的引用(Include)关系图:

浏览源代码.

宏定义

#define TAL_AUDIO_CONFIG_T   TKL_AUDIO_CONFIG_T
 
#define TAL_AUDIO_DETECT_DB_RESULT_T   TKL_AUDIO_DETECT_DB_RESULT_T
 
#define TAL_AUDIO_FRAME_T   TKL_AUDIO_FRAME_T
 

枚举

enum  TAL_AI_CMD_E { TAL_AI_CMD_VOL }
 
enum  TAL_AO_CMD_E { TAL_AO_CMD_VOL }
 

函数

OPERATE_RET tal_ai_detect_db_get_result (INT32_T card, TKL_AUDIO_DETECT_DB_RESULT_T *presult)
 audio detect get result 更多...
 
OPERATE_RET tal_ai_detect_db_start (INT32_T card)
 audio input detect start 更多...
 
OPERATE_RET tal_ai_detect_db_stop (INT32_T card)
 audio input detect stop 更多...
 
OPERATE_RET tal_ai_get_frame (INT32_T card, INT32_T chn, TKL_AUDIO_FRAME_T *pframe)
 ai get frame 更多...
 
OPERATE_RET tal_ai_init (TKL_AUDIO_CONFIG_T *pconfig, INT32_T count)
 ai init 更多...
 
OPERATE_RET tal_ai_set (INT32_T card, INT32_T chn, TAL_AI_CMD_E cmd, VOID *parg)
 ai set 更多...
 
OPERATE_RET tal_ai_start (INT32_T card, INT32_T chn)
 ai start 更多...
 
OPERATE_RET tal_ai_stop (INT32_T card, INT32_T chn)
 ai stop 更多...
 
OPERATE_RET tal_ai_uninit (VOID)
 ai uninit 更多...
 
OPERATE_RET tal_ao_get (INT32_T card, INT32_T chn, VOID *handle, TAL_AO_CMD_E cmd, VOID *parg)
 ao get 更多...
 
OPERATE_RET tal_ao_init (TKL_AUDIO_CONFIG_T *pconfig, INT32_T count, VOID **handle)
 ao init 更多...
 
OPERATE_RET tal_ao_put_frame (INT32_T card, INT32_T chn, VOID *handle, TKL_AUDIO_FRAME_T *pframe)
 ao output frame 更多...
 
OPERATE_RET tal_ao_set (INT32_T card, INT32_T chn, VOID *handle, TAL_AO_CMD_E cmd, VOID *parg)
 ao set 更多...
 
OPERATE_RET tal_ao_start (INT32_T card, INT32_T chn, VOID *handle)
 ao start 更多...
 
OPERATE_RET tal_ao_stop (INT32_T card, INT32_T chn, VOID *handle)
 ao stop 更多...
 
OPERATE_RET tal_ao_uninit (VOID *handle)
 ao uninit 更多...
 

详细描述

Common process - the audio api

版本
0.1
日期
2021-11-09

函数说明

◆ tal_ai_detect_db_get_result()

OPERATE_RET tal_ai_detect_db_get_result ( INT32_T  card,
TKL_AUDIO_DETECT_DB_RESULT_T *  presult 
)

audio detect get result

参数
[in]cardcard number
[out]presultaudio detect result
返回
OPRT_OK on success. Others on error, please refer to tkl_error_code.h

◆ tal_ai_detect_db_start()

OPERATE_RET tal_ai_detect_db_start ( INT32_T  card)

audio input detect start

参数
[in]cardcard number
返回
OPRT_OK on success. Others on error, please refer to tkl_error_code.h

◆ tal_ai_detect_db_stop()

OPERATE_RET tal_ai_detect_db_stop ( INT32_T  card)

audio input detect stop

参数
[in]cardcard number
返回
OPRT_OK on success. Others on error, please refer to tkl_error_code.h

◆ tal_ai_get_frame()

OPERATE_RET tal_ai_get_frame ( INT32_T  card,
INT32_T  chn,
TKL_AUDIO_FRAME_T *  pframe 
)

ai get frame

参数
[in]cardcard number
[in]chnchannel number
[out]pframeaudio frame, pframe->pbuf allocated by upper layer application
返回
OPRT_OK on success. Others on error, please refer to tkl_error_code.h

◆ tal_ai_init()

OPERATE_RET tal_ai_init ( TKL_AUDIO_CONFIG_T *  pconfig,
INT32_T  count 
)

ai init

参数
[in]pconfigaudio config
[in]countcount of pconfig
返回
OPRT_OK on success. Others on error, please refer to tkl_error_code.h

◆ tal_ai_set()

OPERATE_RET tal_ai_set ( INT32_T  card,
INT32_T  chn,
TAL_AI_CMD_E  cmd,
VOID *  parg 
)

ai set

参数
[in]cardcard number
[in]chnchannel number
[in]cmd
[in]parg
返回
OPRT_OK on success. Others on error, please refer to tkl_error_code.h

◆ tal_ai_start()

OPERATE_RET tal_ai_start ( INT32_T  card,
INT32_T  chn 
)

ai start

参数
[in]cardcard number
[in]chnchannel number
返回
OPRT_OK on success. Others on error, please refer to tkl_error_code.h

◆ tal_ai_stop()

OPERATE_RET tal_ai_stop ( INT32_T  card,
INT32_T  chn 
)

ai stop

参数
[in]cardcard number
[in]chnchannel number
返回
OPRT_OK on success. Others on error, please refer to tkl_error_code.h

◆ tal_ai_uninit()

OPERATE_RET tal_ai_uninit ( VOID  )

ai uninit

返回
OPRT_OK on success. Others on error, please refer to tkl_error_code.h

◆ tal_ao_get()

OPERATE_RET tal_ao_get ( INT32_T  card,
INT32_T  chn,
VOID *  handle,
TAL_AO_CMD_E  cmd,
VOID *  parg 
)

ao get

参数
[in]cardcard number
[in]chnchannel number
[in]handlethe return of start
[in]cmd
[in]parg
返回
OPRT_OK on success. Others on error, please refer to tkl_error_code.h

◆ tal_ao_init()

OPERATE_RET tal_ao_init ( TKL_AUDIO_CONFIG_T *  pconfig,
INT32_T  count,
VOID **  handle 
)

ao init

参数
[in]pconfigaudio config
[in]countconfig count
返回
OPRT_OK on success. Others on error, please refer to tkl_error_code.h

◆ tal_ao_put_frame()

OPERATE_RET tal_ao_put_frame ( INT32_T  card,
INT32_T  chn,
VOID *  handle,
TKL_AUDIO_FRAME_T *  pframe 
)

ao output frame

参数
[in]cardcard number
[in]chnchannel number
[in]handlehandle of start
[in]pframeoutput frame
返回
OPRT_OK on success. Others on error, please refer to tkl_error_code.h

◆ tal_ao_set()

OPERATE_RET tal_ao_set ( INT32_T  card,
INT32_T  chn,
VOID *  handle,
TAL_AO_CMD_E  cmd,
VOID *  parg 
)

ao set

参数
[in]cardcard number
[in]chnchannel number
[in]handlethe return of start
[in]cmd
[in]parg
返回
OPRT_OK on success. Others on error, please refer to tkl_error_code.h

◆ tal_ao_start()

OPERATE_RET tal_ao_start ( INT32_T  card,
INT32_T  chn,
VOID *  handle 
)

ao start

参数
[in]cardcard number
[in]chnchannel number
[out]handlehandle of start
返回
OPRT_OK on success. Others on error, please refer to tkl_error_code.h

◆ tal_ao_stop()

OPERATE_RET tal_ao_stop ( INT32_T  card,
INT32_T  chn,
VOID *  handle 
)

ao stop

参数
[in]cardcard number
[in]chnchannel number
[in]handlehandle of start
返回
OPRT_OK on success. Others on error, please refer to tkl_error_code.h

◆ tal_ao_uninit()

OPERATE_RET tal_ao_uninit ( VOID *  handle)

ao uninit

返回
OPRT_OK on success. Others on error, please refer to tkl_error_code.h