![]() |
CI130X SDK API手册
2.2.0
本手册用于描述CI130X SDK各个组件和驱动API
|
播放器 更多...
#include <string.h>#include <stdlib.h>#include "sdk_default_config.h"#include "audio_play_os_port.h"#include "audio_play_config.h"#include "ci130x_system.h"结构体 | |
| struct | audio_play_msg_t |
| 播放请求消息数据结构 更多... | |
| struct | audio_format_info_t |
| 音频信息数据结构 更多... | |
| union | audio_play_msg_t.__unnamed__ |
| 音频数据请求 更多... | |
| struct | audio_play_msg_t.__unnamed__.sd_data |
| sd卡音频数据请求 更多... | |
| struct | audio_play_msg_t.__unnamed__.net_data |
| 网络音频数据请求 更多... | |
| struct | audio_play_msg_t.__unnamed__.flash_data |
| Flash音频数据请求 更多... | |
| union | audio_play_msg_t.__unnamed__.flash_data.__unnamed__ |
| struct | audio_play_msg_t.audio_device_arg |
类型定义 | |
| typedef void(* | CALLBACK_END_PLAY) (int32_t arg) |
| 结束播放回调函数 更多... | |
枚举 | |
| enum | play_data_type_t { AUDIO_PLAY_DATA_TYPE_FLASH = 1, AUDIO_PLAY_DATA_TYPE_SD = 2, AUDIO_PLAY_DATA_TYPE_NET = 3, AUDIO_PLAY_DATA_TYPE_OUTSIDE = 4, AUDIO_PLAY_DATA_TYPE_OUTSIDE_V2 = 5, AUDIO_PLAY_DATA_TYPE_CONTINUE = 99 } |
| 播放数请求类型 更多... | |
| enum | { AUDIO_PLAY_EVENT_NONE = (1<<0), AUDIO_PLAY_EVENT_ONE_BUF_DONE = (1<<4), AUDIO_PLAY_EVENT_PAUSE = (1<<5), AUDIO_PLAY_EVENT_RESUME = (1<<6), AUDIO_PLAY_EVENT_STOP = (1<<7), AUDIO_PLAY_EVENT_PLAY_DONE = (1<<8), AUDIO_PLAY_EVENT_START = (1<<9), AUDIO_PLAY_EVENT_PLAY_TIMEOUT = (1<<10), AUDIO_PLAY_EVENT_PREV = (1<<11) } |
| 播放事件标志 更多... | |
| enum | audio_play_state_t { AUDIO_PLAY_STATE_IDLE, AUDIO_PLAY_STATE_START, AUDIO_PLAY_STATE_PLAYING, AUDIO_PLAY_STATE_STOP } |
| audio play process 任务状态 更多... | |
函数 | |
| void | task_audio_play (void *pvParameters) |
| 播放器调度任务 更多... | |
| int32_t | audio_play_init (void) |
| 初始化播放任务 更多... | |
| void | set_play_will_finish_threshold_data_size (int size) |
| 设置播放data发送will finsh信号阈值 更多... | |
| uint32_t | get_audio_play_state (void) |
| 返回播放器task状态 更多... | |
| void | get_audio_format_info (audio_format_info_t *format) |
| 返回当前音频信息 更多... | |
| int32_t | fastset_audio_end_callback (CALLBACK_END_PLAY callback) |
| 快速设置end回调函数 更多... | |
| uint32_t | get_decode_sync_word_offset (void) |
| 返回当前播放位置 更多... | |
| void | clean_decode_sync_word_offset (void) |
| 清理当前播放位置 更多... | |
变量 | |
| audio_play_os_event_group_t | audio_play_cmd_event_group |
| audio_play_os_queue_t | audio_play_queue |
| audio_play_os_task_t | audio_play_task_handle |
播放器
| struct audio_play_msg_t |
播放请求消息数据结构
| 成员变量 | ||
|---|---|---|
| union audio_play_msg_t | __unnamed__ | 音频数据请求 |
| struct audio_play_msg_t | audio_device_arg |
播放设备硬件参数 |
| CALLBACK_END_PLAY | audio_play_end_hook |
play end callbak |
| const char * | decoder_name |
解码器类型 |
| int | offset |
起始偏移 |
| play_data_type_t | play_data_type |
数据源类型 |
| struct audio_format_info_t |
| union audio_play_msg_t.__unnamed__ |
音频数据请求
| 成员变量 | ||
|---|---|---|
| __unnamed__ | flash_data |
Flash音频数据请求 flash数据 |
| __unnamed__ | net_data |
网络音频数据请求 网络数据 |
| uint32_t | outside_data |
外部数据 |
| __unnamed__ | sd_data |
sd卡音频数据请求 sd卡数据 |
| struct audio_play_msg_t.__unnamed__.sd_data |
| struct audio_play_msg_t.__unnamed__.flash_data |
Flash音频数据请求
| 成员变量 | ||
|---|---|---|
| flash_data | __unnamed__ | |
| uint32_t | data_addr_num |
播报词地址数量 |
| union audio_play_msg_t.__unnamed__.flash_data.__unnamed__ |
| struct audio_play_msg_t.audio_device_arg |
| 成员变量 | ||
|---|---|---|
| FunctionalState | pa_cmd |
本次播放是否开关PA |
| typedef void(* CALLBACK_END_PLAY) (int32_t arg) |
结束播放回调函数
| anonymous enum |
| int32_t audio_play_init | ( | void | ) |
初始化播放任务
| RETURN_OK | 初始化成功 |
| RETURN_ERR | 初始化失败 |
| void clean_decode_sync_word_offset | ( | void | ) |
清理当前播放位置
| int32_t fastset_audio_end_callback | ( | CALLBACK_END_PLAY | callback | ) |
快速设置end回调函数
| callback | 播放结束回调函数句柄 |
| RETURN_OK | 设置成功 |
| RETURN_ERR | 设置失败 |
| void get_audio_format_info | ( | audio_format_info_t * | format | ) |
返回当前音频信息
| format | 音频信息结构 |
| uint32_t get_audio_play_state | ( | void | ) |
返回播放器task状态
| uint32_t get_decode_sync_word_offset | ( | void | ) |
返回当前播放位置
| void set_play_will_finish_threshold_data_size | ( | int | size | ) |
设置播放data发送will finsh信号阈值
| size |
| void task_audio_play | ( | void * | pvParameters | ) |
播放器调度任务
| pvParameters | 任务参数 |
| audio_play_os_event_group_t audio_play_cmd_event_group |
播放事件标志组句柄
| audio_play_os_queue_t audio_play_queue |
播放消息队列句柄
| audio_play_os_task_t audio_play_task_handle |
播放任务句柄
1.8.14