CI130X SDK API手册  2.2.0
本手册用于描述CI130X SDK各个组件和驱动API
宏定义 | 函数 | 变量
adpcm.c 文件参考
#include <stdint.h>
#include "adpcm.h"
#include "ci130x_system.h"
#include "romlib_runtime.h"

宏定义

#define USE_MASK_ROM_PCM_TABLE_DATA   1
 

函数

uint8_t ADPCM_Encode (int32_t sample)
 ADPCM_Encode. 更多...
 
int16_t ADPCM_Decode (uint8_t code)
 ADPCM_Decode. 更多...
 
int32_t ADPCM_Decode_clear (void)
 
void set_adpcm_decode_index (int16_t decode_index)
 
void set_adpcm_decode_predsample (int32_t decode_predsample)
 

变量

uint16_t const * StepSizeTable = (uint16_t const*)(MASK_ROM_PCM_TABLE_ADDR)
 
const int8_t IndexTable [16] = {0xff, 0xff, 0xff, 0xff, 2, 4, 6, 8, 0xff, 0xff, 0xff, 0xff, 2, 4, 6, 8}
 
static int16_t Encodeindex = 0
 
static int32_t Encodepredsample = 0
 
static int16_t Decodeindex = 0
 
static int32_t Decodepredsample = 0
 

宏定义说明

◆ USE_MASK_ROM_PCM_TABLE_DATA

#define USE_MASK_ROM_PCM_TABLE_DATA   1

函数说明

◆ ADPCM_Decode()

int16_t ADPCM_Decode ( uint8_t  code)

ADPCM_Decode.

参数
codea byte containing a 4-bit ADPCM sample.
返回值
16-bit ADPCM sample

◆ ADPCM_Decode_clear()

int32_t ADPCM_Decode_clear ( void  )

◆ ADPCM_Encode()

uint8_t ADPCM_Encode ( int32_t  sample)

ADPCM_Encode.

参数
samplea 16-bit PCM sample
返回值
a 4-bit ADPCM sample

◆ set_adpcm_decode_index()

void set_adpcm_decode_index ( int16_t  decode_index)

◆ set_adpcm_decode_predsample()

void set_adpcm_decode_predsample ( int32_t  decode_predsample)

变量说明

◆ Decodeindex

int16_t Decodeindex = 0
static

◆ Decodepredsample

int32_t Decodepredsample = 0
static

◆ Encodeindex

int16_t Encodeindex = 0
static

◆ Encodepredsample

int32_t Encodepredsample = 0
static

◆ IndexTable

const int8_t IndexTable[16] = {0xff, 0xff, 0xff, 0xff, 2, 4, 6, 8, 0xff, 0xff, 0xff, 0xff, 2, 4, 6, 8}

◆ StepSizeTable

uint16_t const* StepSizeTable = (uint16_t const*)(MASK_ROM_PCM_TABLE_ADDR)