![]() |
CI130X SDK API手册
2.2.0
本手册用于描述CI130X SDK各个组件和驱动API
|
播放器接口函数 更多...
#include "audio_play_process.h"
#include "audio_play_config.h"
#include "audio_play_os_port.h"
#include "sdk_default_config.h"
函数 | |
int32_t | get_audio_play_version (char version[3]) |
获取播放器组件版本号 更多... | |
int32_t | play_prompt (uint32_t data_addr, uint32_t data_addr_num, CALLBACK_END_PLAY end_paly_callback) |
播放ADPCM 更多... | |
void | pause_audio_play_prompt (uint32_t data_addr, uint32_t data_addr_num, CALLBACK_END_PLAY end_paly_callback) |
暂停当前的audio播放adpcm 更多... | |
int32_t | stop_play (CALLBACK_END_PLAY end_paly_callback, void *xHigherPriorityTaskWoken) |
停止播放 更多... | |
int32_t | pause_play (CALLBACK_END_PLAY end_paly_callback, void *xHigherPriorityTaskWoken) |
暂停播放 更多... | |
int32_t | play_audio (const char *dir_or_url, const char *name, int offset, const char *decoder_name, CALLBACK_END_PLAY end_paly_callback) |
从sd卡或网络播放音乐 更多... | |
void | pause_audio_play_audio (const char *dir, const char *name, int offset, const char *decoder_name, CALLBACK_END_PLAY end_paly_callback) |
暂停当前的audio播放新的audio 更多... | |
int32_t | continue_history_play (CALLBACK_END_PLAY end_paly_callback) |
播放最近一次被打断的mp3 更多... | |
uint32_t | get_play_offset (void) |
获取当前的播放进度, 更多... | |
uint32_t | get_data_load_offset (void) |
获取读入数据缓冲器进度, 更多... | |
void | audio_play_set_vol_gain (int32_t gain) |
调节播放音量 更多... | |
int32_t | audio_play_get_vol_gain (void) |
获取当前播放音量 更多... | |
void | audio_play_set_mute (bool is_mute) |
设置静音 更多... | |
void | audio_play_hw_pa_da_ctl (FunctionalState cmd, bool is_control_pa) |
pa、da控制,可选择是否控制功放 更多... | |
void | set_play_speed (float play_speed) |
设置播放倍速 更多... | |
播放器接口函数
anonymous enum |
int32_t audio_play_get_vol_gain | ( | void | ) |
获取当前播放音量
void audio_play_hw_pa_da_ctl | ( | FunctionalState | cmd, |
bool | is_control_pa | ||
) |
pa、da控制,可选择是否控制功放
cmd | pa使能或失能 |
< 输入
< 输出
void audio_play_set_mute | ( | bool | is_mute | ) |
设置静音
is_mute | 是否静音 |
void audio_play_set_vol_gain | ( | int32_t | gain | ) |
调节播放音量
gain | 音量(0–100) |
int32_t continue_history_play | ( | CALLBACK_END_PLAY | end_paly_callback | ) |
播放最近一次被打断的mp3
end_paly_callback | 结束播放回调函数指针 |
RETURN_OK | 播放启动成功 |
RETURN_ERR | 播放启动失败 |
int32_t get_audio_play_version | ( | char | version[3] | ) |
获取播放器组件版本号
version | 版本号buf,3byte |
RETURN_OK | 获取成功 |
RETURN_ERR | 获取失败 |
uint32_t get_data_load_offset | ( | void | ) |
获取读入数据缓冲器进度,
uint32_t get_play_offset | ( | void | ) |
获取当前的播放进度,
void pause_audio_play_audio | ( | const char * | dir, |
const char * | name, | ||
int | offset, | ||
const char * | decoder_name, | ||
CALLBACK_END_PLAY | end_paly_callback | ||
) |
暂停当前的audio播放新的audio
dir | 文件路径 |
name | 文件名 |
offset | 播放偏移 |
decoder_name | 解码器名称 |
end_paly_callback | 结束播放回调函数指针 |
void pause_audio_play_prompt | ( | uint32_t | data_addr, |
uint32_t | data_addr_num, | ||
CALLBACK_END_PLAY | end_paly_callback | ||
) |
暂停当前的audio播放adpcm
data_addr | 播报词在flash内地址 |
end_paly_callback | 结束播放回调函数指针 |
int32_t pause_play | ( | CALLBACK_END_PLAY | end_paly_callback, |
void * | xHigherPriorityTaskWoken | ||
) |
暂停播放
end_paly_callback | 结束播放回调函数指针 |
RETURN_OK | 暂停成功 |
RETURN_ERR | 暂停失败(可能已经停止或未进行播放) |
int32_t play_audio | ( | const char * | dir_or_url, |
const char * | name, | ||
int | offset, | ||
const char * | decoder_name, | ||
CALLBACK_END_PLAY | end_paly_callback | ||
) |
从sd卡或网络播放音乐
dir_or_url | 播放路径 |
name | 文件名称 |
offset | 播放偏移 |
decoder_name | 解码器名称 |
end_paly_callback | 结束播放回调函数指针 |
RETURN_OK | 播放启动成功 |
RETURN_ERR | 播放启动失败 |
int32_t play_prompt | ( | uint32_t | data_addr, |
uint32_t | data_addr_num, | ||
CALLBACK_END_PLAY | end_paly_callback | ||
) |
播放ADPCM
data_addr | 播报词在flash内地址 |
end_paly_callback | 结束播放回调函数指针 |
RETURN_OK | 播放启动成功 |
RETURN_ERR | 播放启动失败 |
void set_play_speed | ( | float | play_speed | ) |
设置播放倍速
play_speed | 浮点型,1.0为无倍速,2.0为加速为2倍速,0.5为减速为1/2倍速 |
int32_t stop_play | ( | CALLBACK_END_PLAY | end_paly_callback, |
void * | xHigherPriorityTaskWoken | ||
) |
停止播放
end_paly_callback | 结束播放回调函数指针 |
RETURN_OK | 停止成功 |
RETURN_ERR | 停止失败(可能已经停止或未进行播放) |