TuyaOS
成员变量
TKL_AUDIO_PLAY_OPS_T结构体 参考

成员变量

VOID(* data_consumed )(PVOID_T param, UINT_T bytes)
 indicate audio data consumed 更多...
 
BOOL_T(* get_frame )(PVOID_T param, TKL_AUDIO_FRAME_T *frame)
 get audio frame 更多...
 
VOID(* handle_event )(PVOID_T param, TKL_AUDIO_PLAYER_EVENT_E event)
 handle play event from audio device 更多...
 

结构体成员变量说明

◆ data_consumed

VOID(* TKL_AUDIO_PLAY_OPS_T::data_consumed) (PVOID_T param, UINT_T bytes)

indicate audio data consumed

This will be called by audio device, to indicate byte count consumed in audio frame get by get_frame.

参数
paramplayer operation context
bytesbyte count

◆ get_frame

BOOL_T(* TKL_AUDIO_PLAY_OPS_T::get_frame) (PVOID_T param, TKL_AUDIO_FRAME_T *frame)

get audio frame

When more data are needed, audio device will call get_frame for audio frames.

At the end of stream, callee should return empty audio frame with TKL_AUFRAME_FLAG_END.

参数
paramplayer operation context
frameaudio frame, filled by callee
返回
  • true on success
  • false on error

◆ handle_event

VOID(* TKL_AUDIO_PLAY_OPS_T::handle_event) (PVOID_T param, TKL_AUDIO_PLAYER_EVENT_E event)

handle play event from audio device

参数
paramplayer operation context
eventaudio device play event

该结构体的文档由以下文件生成: