CI13LC SDK API手册  2.1.1
本手册用于描述CI13LC SDK各个组件和驱动API
结构体 | 宏定义 | 类型定义 | 枚举 | 函数
mp3dec.h 文件参考
#include <stdlib.h>

浏览源代码.

结构体

struct  _MP3FrameInfo
 

宏定义

#define MAINBUF_SIZE   1940
 
#define MAX_NGRAN   2 /* max granules */
 
#define MAX_NCHAN   2 /* max channels */
 
#define MAX_NSAMP   576 /* max samples per channel, per granule */
 

类型定义

typedef void * HMP3Decoder
 
typedef void * MP3SaveLastInfo
 
typedef struct _MP3FrameInfo MP3FrameInfo
 

枚举

enum  MPEGVersion {
  MPEG1 = 0,
  MPEG2 = 1,
  MPEG25 = 2
}
 
enum  {
  ERR_MP3_NONE = 0,
  ERR_MP3_INDATA_UNDERFLOW = -1,
  ERR_MP3_MAINDATA_UNDERFLOW = -2,
  ERR_MP3_FREE_BITRATE_SYNC = -3,
  ERR_MP3_OUT_OF_MEMORY = -4,
  ERR_MP3_NULL_POINTER = -5,
  ERR_MP3_INVALID_FRAMEHEADER = -6,
  ERR_MP3_INVALID_SIDEINFO = -7,
  ERR_MP3_INVALID_SCALEFACT = -8,
  ERR_MP3_INVALID_HUFFCODES = -9,
  ERR_MP3_INVALID_DEQUANTIZE = -10,
  ERR_MP3_INVALID_IMDCT = -11,
  ERR_MP3_INVALID_SUBBAND = -12,
  ERR_MP3_UNKNOWN = -9999
}
 

函数

HMP3Decoder MP3InitDecoder (void)
 
void MP3FreeDecoder (HMP3Decoder hMP3Decoder)
 
int MP3Decode (HMP3Decoder hMP3Decoder, unsigned char **inbuf, int *bytesLeft, short *outbuf, int useSize)
 
size_t MP3GetSaveLastInfoStructSize (void)
 
int MP3ClearLastDecodeMainData (HMP3Decoder hMP3Decoder)
 
int MP3SaveLastDecodeMainData (HMP3Decoder hMP3Decoder, MP3SaveLastInfo saveInfo)
 
int MP3LoadLastDecodeMainData (HMP3Decoder hMP3Decoder, MP3SaveLastInfo saveInfo)
 
void MP3GetLastFrameInfo (HMP3Decoder hMP3Decoder, MP3FrameInfo *mp3FrameInfo)
 
int MP3GetNextFrameInfo (HMP3Decoder hMP3Decoder, MP3FrameInfo *mp3FrameInfo, unsigned char *buf)
 
int MP3FindSyncWord (unsigned char *buf, int nBytes)
 
void MP3Lib_Set_Func (void *f1, void *f2, void *f3, void *f4, void *f5)
 

结构体说明

◆ _MP3FrameInfo

struct _MP3FrameInfo
成员变量
int bitrate
int bitsPerSample
int layer
int nChans
int outputSamps
int samprate
int version

宏定义说明

◆ MAINBUF_SIZE

#define MAINBUF_SIZE   1940

◆ MAX_NCHAN

#define MAX_NCHAN   2 /* max channels */

◆ MAX_NGRAN

#define MAX_NGRAN   2 /* max granules */

◆ MAX_NSAMP

#define MAX_NSAMP   576 /* max samples per channel, per granule */

类型定义说明

◆ HMP3Decoder

typedef void* HMP3Decoder

◆ MP3FrameInfo

typedef struct _MP3FrameInfo MP3FrameInfo

◆ MP3SaveLastInfo

typedef void* MP3SaveLastInfo

枚举类型说明

◆ anonymous enum

anonymous enum
枚举值
ERR_MP3_NONE 
ERR_MP3_INDATA_UNDERFLOW 
ERR_MP3_MAINDATA_UNDERFLOW 
ERR_MP3_FREE_BITRATE_SYNC 
ERR_MP3_OUT_OF_MEMORY 
ERR_MP3_NULL_POINTER 
ERR_MP3_INVALID_FRAMEHEADER 
ERR_MP3_INVALID_SIDEINFO 
ERR_MP3_INVALID_SCALEFACT 
ERR_MP3_INVALID_HUFFCODES 
ERR_MP3_INVALID_DEQUANTIZE 
ERR_MP3_INVALID_IMDCT 
ERR_MP3_INVALID_SUBBAND 
ERR_MP3_UNKNOWN 

◆ MPEGVersion

枚举值
MPEG1 
MPEG2 
MPEG25 

函数说明

◆ MP3ClearLastDecodeMainData()

int MP3ClearLastDecodeMainData ( HMP3Decoder  hMP3Decoder)

◆ MP3Decode()

int MP3Decode ( HMP3Decoder  hMP3Decoder,
unsigned char **  inbuf,
int *  bytesLeft,
short *  outbuf,
int  useSize 
)

◆ MP3FindSyncWord()

int MP3FindSyncWord ( unsigned char *  buf,
int  nBytes 
)

◆ MP3FreeDecoder()

void MP3FreeDecoder ( HMP3Decoder  hMP3Decoder)

◆ MP3GetLastFrameInfo()

void MP3GetLastFrameInfo ( HMP3Decoder  hMP3Decoder,
MP3FrameInfo mp3FrameInfo 
)

◆ MP3GetNextFrameInfo()

int MP3GetNextFrameInfo ( HMP3Decoder  hMP3Decoder,
MP3FrameInfo mp3FrameInfo,
unsigned char *  buf 
)

◆ MP3GetSaveLastInfoStructSize()

size_t MP3GetSaveLastInfoStructSize ( void  )

◆ MP3InitDecoder()

HMP3Decoder MP3InitDecoder ( void  )

◆ MP3Lib_Set_Func()

void MP3Lib_Set_Func ( void *  f1,
void *  f2,
void *  f3,
void *  f4,
void *  f5 
)

◆ MP3LoadLastDecodeMainData()

int MP3LoadLastDecodeMainData ( HMP3Decoder  hMP3Decoder,
MP3SaveLastInfo  saveInfo 
)

◆ MP3SaveLastDecodeMainData()

int MP3SaveLastDecodeMainData ( HMP3Decoder  hMP3Decoder,
MP3SaveLastInfo  saveInfo 
)