![]() |
CI130X SDK API手册
2.2.0
本手册用于描述CI130X SDK各个组件和驱动API
|
播放器音频解码器框架 更多...
#include "audio_play_decoder.h"
#include "ci130x_system.h"
#include "ci_log.h"
#include "audio_play_os_port.h"
#include "audio_play_config.h"
#include "romlib_runtime.h"
#include "ci_flash_data_info.h"
#include "flacdecoder.h"
#include <stdlib.h>
#include "adpcmdec.h"
#include "adpcm.h"
#include "aacdec.h"
#include "parse_m4a_atom_containers.h"
宏定义 | |
#define | MP3_IN_SIZE (576) |
#define | FLAC_MALLOC malloc |
#define | FLAC_FREE free |
#define | FLAC_IN_SIZE (4000) |
#define | MS_WAV_IN_SIZE (1152) |
#define | ADPCM_IN_SIZE (576) |
#define | IMAADPCM_IN_SIZE (1138) |
#define | PROMPT_MP3_IN_SIZE (324) |
#define | PROMPT_FLAC_IN_SIZE (2304) |
#define | AAC_IN_SIZE (2*AAC_MAINBUF_SIZE) |
类型定义 | |
typedef int32_t(* | decode_fun) (uint8_t *, uint32_t, short *, uint32_t *, uint32_t *, audio_format_info_t *) |
函数 | |
int32_t | audio_play_mp3_init (void) |
解码器初始化 更多... | |
int32_t | audio_play_mp3_destroy (void) |
mp3解码器销毁 更多... | |
int32_t | audio_play_mp3_clear (void) |
mp3解码器复位 更多... | |
int32_t | audio_play_mp3_decode (uint8_t *input, uint32_t in_size, short *output, uint32_t *out_size, uint32_t *no_use_size, audio_format_info_t *audio_format_info) |
mp3帧解码 更多... | |
int32_t | audio_play_flac_init (void) |
flac解码器初始化 更多... | |
int32_t | audio_play_flac_destroy (void) |
flac解码器销毁 更多... | |
int32_t | audio_play_flac_decode (uint8_t *input, uint32_t in_size, short *output, uint32_t *out_size, uint32_t *no_use_size, audio_format_info_t *audio_format_info) |
FLAC帧解码 更多... | |
int32_t | audio_play_flac_config (void *mode) |
配置解码器模式 更多... | |
int32_t | audio_play_flac_clear (void) |
int32_t | audio_play_ms_wav_decode (uint8_t *input, uint32_t in_size, short *output, uint32_t *out_size, uint32_t *no_use_size, audio_format_info_t *audio_format_info) |
MS WAV帧解码 更多... | |
int32_t | audio_play_ms_wav_clear (void) |
ms_wav解码器复位 更多... | |
int32_t | audio_play_adpcm_decode (uint8_t *input, uint32_t in_size, short *output, uint32_t *out_size, uint32_t *no_use_size, audio_format_info_t *audio_format_info) |
adpcm帧解码(用于CI旧版adpcm) 更多... | |
int32_t | audio_play_adpcm_decode2 (uint8_t *input, uint32_t in_size, short *output, uint32_t *out_size, uint32_t *no_use_size, audio_format_info_t *audio_format_info) |
adpcm帧解码2(用于标准adpcm文件) 更多... | |
int32_t | audio_play_prompt_config (void *mode) |
配置解码器模式 更多... | |
int32_t | audio_play_prompt_clear (void) |
prompt解码器复位 更多... | |
int32_t | audio_play_prompt_init (void) |
解码器初始化 更多... | |
int32_t | audio_play_prompt_destroy (void) |
解码器销毁 更多... | |
int32_t | audio_play_aac_init (void) |
aac解码器初始化 更多... | |
int32_t | audio_play_aac_destroy (void) |
aac解码器销毁 更多... | |
int32_t | audio_play_aac_decode (uint8_t *input, uint32_t in_size, short *output, uint32_t *out_size, uint32_t *no_use_size, audio_format_info_t *audio_format_info) |
aac帧解码,用于adts流解码 更多... | |
int32_t | audio_play_aac_decode_2 (uint8_t *input, uint32_t in_size, short *output, uint32_t *out_size, uint32_t *no_use_size, audio_format_info_t *audio_format_info) |
aac帧解码2,用于aac源数据解码 更多... | |
int32_t | audio_play_aac_config (void *mode) |
配置解码器模式 更多... | |
int32_t | audio_play_aac_save (void) |
aac解码器现场保存 更多... | |
int32_t | audio_play_aac_load (void) |
aac解码器现场恢复 更多... | |
int32_t | audio_play_aac_clear (void) |
aac解码器复位 更多... | |
变量 | |
static HMP3Decoder | mp3_dec_handle |
static MP3FrameInfo | mp3FrameInfo |
audio_play_decoder_ops_t | mp3_decoder |
mp3解码器结构对象 更多... | |
FLACContext * | fc = NULL |
audio_play_decoder_ops_t | flac_decoder |
flac解码器结构对象 更多... | |
static uint32_t | wav_nSamplesPerSec = 16000 |
audio_play_decoder_ops_t | ms_wav_decoder |
MS WAV解码器结构对象 更多... | |
static uint32_t | adpcmBlockAlign = 0 |
static uint32_t | adpcm_head_size = 0 |
static uint32_t | adpcm_nSamplesPerSec = 16000 |
audio_play_decoder_ops_t | prompt_decoder |
adpcm解码器结构对象 更多... | |
static HAACDecoder | aac_dec_handle |
static AACFrameInfo | aacFrameInfo |
static m4a_file_info_t | save_m4a_file_info |
decode_fun | save_aacdecode = NULL |
audio_play_decoder_ops_t | aac_decoder |
aac解码器结构对象 更多... | |
播放器音频解码器框架
#define AAC_IN_SIZE (2*AAC_MAINBUF_SIZE) |
#define ADPCM_IN_SIZE (576) |
#define FLAC_FREE free |
#define FLAC_IN_SIZE (4000) |
#define FLAC_MALLOC malloc |
#define IMAADPCM_IN_SIZE (1138) |
#define MP3_IN_SIZE (576) |
#define MS_WAV_IN_SIZE (1152) |
#define PROMPT_FLAC_IN_SIZE (2304) |
#define PROMPT_MP3_IN_SIZE (324) |
typedef int32_t(* decode_fun) (uint8_t *, uint32_t, short *, uint32_t *, uint32_t *, audio_format_info_t *) |
int32_t audio_play_aac_clear | ( | void | ) |
aac解码器复位
RETURN_OK | 复位成功 |
RETURN_ERR | 复位失败 |
int32_t audio_play_aac_config | ( | void * | mode | ) |
配置解码器模式
mode | 模式参数 |
RETURN_OK | 配置正确 |
RETURN_ERR | 配置异常 |
int32_t audio_play_aac_decode | ( | uint8_t * | input, |
uint32_t | in_size, | ||
short * | output, | ||
uint32_t * | out_size, | ||
uint32_t * | no_use_size, | ||
audio_format_info_t * | audio_format_info | ||
) |
aac帧解码,用于adts流解码
input | 输入帧地址 |
in_size | 输入长度 |
output | 输出帧地址 |
out_size | 输出帧大小 |
no_use_size | 未使用的数据大小 |
audio_format_info | 音频信息结构 |
RETURN_OK | 帧解码正确 |
RETURN_ERR | 帧解码异常 |
int32_t audio_play_aac_decode_2 | ( | uint8_t * | input, |
uint32_t | in_size, | ||
short * | output, | ||
uint32_t * | out_size, | ||
uint32_t * | no_use_size, | ||
audio_format_info_t * | audio_format_info | ||
) |
aac帧解码2,用于aac源数据解码
input | 输入帧地址 |
in_size | 输入长度 |
output | 输出帧地址 |
out_size | 输出帧大小 |
no_use_size | 未使用的数据大小 |
audio_format_info | 音频信息结构 |
RETURN_OK | 帧解码正确 |
RETURN_ERR | 帧解码异常 |
int32_t audio_play_aac_destroy | ( | void | ) |
aac解码器销毁
RETURN_OK | 解码器销毁成功 |
RETURN_ERR | 解码器销毁失败 |
int32_t audio_play_aac_init | ( | void | ) |
aac解码器初始化
RETURN_OK | 初始化成功 |
RETURN_ERR | 初始化失败 |
int32_t audio_play_aac_load | ( | void | ) |
aac解码器现场恢复
RETURN_OK | 恢复成功 |
RETURN_ERR | 恢复失败 |
int32_t audio_play_aac_save | ( | void | ) |
aac解码器现场保存
RETURN_OK | 保存成功 |
RETURN_ERR | 保存失败 |
int32_t audio_play_adpcm_decode | ( | uint8_t * | input, |
uint32_t | in_size, | ||
short * | output, | ||
uint32_t * | out_size, | ||
uint32_t * | no_use_size, | ||
audio_format_info_t * | audio_format_info | ||
) |
adpcm帧解码(用于CI旧版adpcm)
input | 输入帧地址 |
in_size | 输入长度 |
output | 输出帧地址 |
out_size | 输出帧大小 |
no_use_size | 未使用的数据大小 |
audio_format_info | 音频信息结构 |
RETURN_OK | 帧解码正确 |
RETURN_ERR | 帧解码异常 |
int32_t audio_play_adpcm_decode2 | ( | uint8_t * | input, |
uint32_t | in_size, | ||
short * | output, | ||
uint32_t * | out_size, | ||
uint32_t * | no_use_size, | ||
audio_format_info_t * | audio_format_info | ||
) |
adpcm帧解码2(用于标准adpcm文件)
input | 输入帧地址 |
in_size | 输入长度 |
output | 输出帧地址 |
out_size | 输出帧大小 |
no_use_size | 未使用的数据大小 |
audio_format_info | 音频信息结构 |
RETURN_OK | 帧解码正确 |
RETURN_ERR | 帧解码异常 |
int32_t audio_play_flac_clear | ( | void | ) |
int32_t audio_play_flac_config | ( | void * | mode | ) |
配置解码器模式
mode | 模式参数 |
RETURN_OK | 配置正确 |
RETURN_ERR | 配置异常 |
int32_t audio_play_flac_decode | ( | uint8_t * | input, |
uint32_t | in_size, | ||
short * | output, | ||
uint32_t * | out_size, | ||
uint32_t * | no_use_size, | ||
audio_format_info_t * | audio_format_info | ||
) |
FLAC帧解码
input | 输入帧地址 |
in_size | 输入长度 |
output | 输出帧地址 |
out_size | 输出帧大小 |
no_use_size | 未使用的数据大小 |
audio_format_info | 音频信息结构 |
RETURN_OK | 帧解码正确 |
RETURN_ERR | 帧解码异常 |
int32_t audio_play_flac_destroy | ( | void | ) |
flac解码器销毁
RETURN_OK | 解码器销毁成功 |
RETURN_ERR | 解码器销毁失败 |
int32_t audio_play_flac_init | ( | void | ) |
flac解码器初始化
RETURN_OK | 初始化成功 |
RETURN_ERR | 初始化失败 |
int32_t audio_play_mp3_clear | ( | void | ) |
mp3解码器复位
RETURN_OK | 复位成功 |
RETURN_ERR | 复位失败 |
int32_t audio_play_mp3_decode | ( | uint8_t * | input, |
uint32_t | in_size, | ||
short * | output, | ||
uint32_t * | out_size, | ||
uint32_t * | no_use_size, | ||
audio_format_info_t * | audio_format_info | ||
) |
mp3帧解码
input | 输入帧地址 |
in_size | 输入长度 |
output | 输出帧地址 |
out_size | 输出帧大小 |
no_use_size | 未使用的数据大小 |
audio_format_info | 音频信息结构 |
RETURN_OK | 帧解码正确 |
RETURN_ERR | 帧解码异常 |
int32_t audio_play_mp3_destroy | ( | void | ) |
mp3解码器销毁
RETURN_OK | 销毁成功 |
RETURN_ERR | 销毁失败 |
int32_t audio_play_mp3_init | ( | void | ) |
解码器初始化
RETURN_OK | 初始化成功 |
RETURN_ERR | 初始化失败 |
int32_t audio_play_ms_wav_clear | ( | void | ) |
ms_wav解码器复位
RETURN_OK | 复位成功 |
RETURN_ERR | 复位失败 |
int32_t audio_play_ms_wav_decode | ( | uint8_t * | input, |
uint32_t | in_size, | ||
short * | output, | ||
uint32_t * | out_size, | ||
uint32_t * | no_use_size, | ||
audio_format_info_t * | audio_format_info | ||
) |
MS WAV帧解码
input | 输入帧地址 |
in_size | 输入长度 |
output | 输出帧地址 |
out_size | 输出帧大小 |
no_use_size | 未使用的数据大小 |
audio_format_info | 音频信息结构 |
RETURN_OK | 帧解码正确 |
RETURN_ERR | 帧解码异常 |
int32_t audio_play_prompt_clear | ( | void | ) |
prompt解码器复位
RETURN_OK | 复位成功 |
RETURN_ERR | 复位失败 |
int32_t audio_play_prompt_config | ( | void * | mode | ) |
配置解码器模式
mode | 模式参数 |
RETURN_OK | 配置正确 |
RETURN_ERR | 配置异常 |
int32_t audio_play_prompt_destroy | ( | void | ) |
解码器销毁
RETURN_OK | 销毁成功 |
RETURN_ERR | 销毁失败 |
int32_t audio_play_prompt_init | ( | void | ) |
解码器初始化
RETURN_OK | 初始化成功 |
RETURN_ERR | 初始化失败 |
|
static |
audio_play_decoder_ops_t aac_decoder |
aac解码器结构对象
|
static |
|
static |
|
static |
|
static |
FLACContext* fc = NULL |
audio_play_decoder_ops_t flac_decoder |
flac解码器结构对象
|
static |
audio_play_decoder_ops_t mp3_decoder |
mp3解码器结构对象
|
static |
audio_play_decoder_ops_t ms_wav_decoder |
MS WAV解码器结构对象
audio_play_decoder_ops_t prompt_decoder |
adpcm解码器结构对象
decode_fun save_aacdecode = NULL |
|
static |
|
static |