CI130X SDK API手册  2.2.0
本手册用于描述CI130X SDK各个组件和驱动API
audio_play_process.h
浏览该文件的文档.
1 
11 #ifndef _AUDIO_PLAY_PROCESS_H_
12 #define _AUDIO_PLAY_PROCESS_H_
13 
14 #include <string.h>
15 #include <stdlib.h>
16 #include "sdk_default_config.h"
17 #include "audio_play_os_port.h"
18 #include "audio_play_config.h"
19 #include "ci130x_system.h"
20 
21 
26 typedef enum
27 {
36 
40 enum
41 {
51 };
52 
57 typedef void(*CALLBACK_END_PLAY)(int32_t arg);
58 
59 
64 typedef struct
65 {
66  const char *decoder_name;
69  union
70  {
72  struct
73  {
74  const char *dir;
75  const char *name;
76  }sd_data;
78  struct
79  {
80  const char *url;
81  }net_data;
83  struct
84  {
85  union
86  {
87  uint32_t arg;
88  uint32_t data_addr;
89  uint32_t data_addr_list;
90  };
91  uint32_t data_addr_num;
92  }flash_data;
93  uint32_t outside_data;
94  };
95  int offset;
96  struct
97  {
98  FunctionalState pa_cmd;
99  }audio_device_arg;
102 
103 
108 typedef enum
109 {
115 
116 
121 typedef struct
122 {
123  uint32_t samprate;
124  uint8_t nChans;
125  int32_t out_min_size;
127 
128 
129 /***************************************************************************
130  extern
131 ****************************************************************************/
135 
136 /***************************************************************************
137  extern function
138 ****************************************************************************/
139 extern void task_audio_play(void *pvParameters);
140 extern int32_t audio_play_init(void);
141 #if AUDIO_PLAY_SUPPT_WAKEUP_VOICE_IN_RAM
142 extern int32_t read_weakup_voice_to_ram(uint32_t wakeup_voice_flash_addr);
143 #endif
144 extern void set_play_will_finish_threshold_data_size(int size);
145 extern uint32_t get_audio_play_state(void);
146 extern void get_audio_format_info(audio_format_info_t *format);
147 extern int32_t fastset_audio_end_callback(CALLBACK_END_PLAY callback);
148 extern uint32_t get_decode_sync_word_offset(void);
149 extern void clean_decode_sync_word_offset(void);
150 
151 
152 #endif /* _AUDIO_PLAY_PROCESS_H_ */
void * audio_play_os_task_t
任务句柄类型
Definition: audio_play_os_port.h:30
播放请求消息数据结构
Definition: audio_play_process.h:64
Definition: audio_play_process.h:113
Definition: audio_play_process.h:29
Definition: audio_play_process.h:111
uint32_t get_audio_play_state(void)
返回播放器task状态
Definition: audio_play_process.c:1652
Definition: audio_play_process.h:44
uint32_t samprate
Definition: audio_play_process.h:123
void clean_decode_sync_word_offset(void)
清理当前播放位置
Definition: audio_play_process.c:1706
void set_play_will_finish_threshold_data_size(int size)
设置播放data发送will finsh信号阈值
Definition: audio_play_process.c:1716
Definition: audio_play_process.h:30
Definition: audio_play_process.h:45
uint32_t get_decode_sync_word_offset(void)
返回当前播放位置
Definition: audio_play_process.c:1696
audio_play_os_task_t audio_play_task_handle
Definition: audio_play_process.c:101
Definition: audio_play_process.h:112
Definition: audio_play_process.h:42
play_data_type_t play_data_type
Definition: audio_play_process.h:67
int offset
Definition: audio_play_process.h:95
音频信息数据结构
Definition: audio_play_process.h:121
void * audio_play_os_queue_t
队列句柄类型
Definition: audio_play_os_port.h:42
void task_audio_play(void *pvParameters)
播放器调度任务
Definition: audio_play_process.c:1887
Definition: audio_play_process.h:43
void(* CALLBACK_END_PLAY)(int32_t arg)
结束播放回调函数
Definition: audio_play_process.h:57
int32_t out_min_size
Definition: audio_play_process.h:125
Definition: audio_play_process.h:47
CALLBACK_END_PLAY audio_play_end_hook
Definition: audio_play_process.h:100
int32_t audio_play_init(void)
初始化播放任务
Definition: audio_play_process.c:1792
Definition: audio_play_process.h:110
const char * decoder_name
Definition: audio_play_process.h:66
Definition: audio_play_process.h:49
int32_t fastset_audio_end_callback(CALLBACK_END_PLAY callback)
快速设置end回调函数
Definition: audio_play_process.c:1676
chip级定义
Definition: audio_play_process.h:34
Definition: audio_play_process.h:31
audio_play_state_t
audio play process 任务状态
Definition: audio_play_process.h:108
Definition: audio_play_process.h:48
play_data_type_t
播放数请求类型
Definition: audio_play_process.h:26
播放器组件OS移植层
Definition: audio_play_process.h:32
FunctionalState
Definition: ci130x_system.h:86
uint8_t nChans
Definition: audio_play_process.h:124
audio_play_os_queue_t audio_play_queue
Definition: audio_play_process.c:99
Definition: audio_play_process.h:46
void * audio_play_os_event_group_t
事件标志组类型
Definition: audio_play_os_port.h:54
sdk配置文件
Definition: audio_play_process.h:50
Definition: audio_play_process.h:28
audio_play_os_event_group_t audio_play_cmd_event_group
Definition: audio_play_process.c:97
void get_audio_format_info(audio_format_info_t *format)
返回当前音频信息
Definition: audio_play_process.c:1662