📄 audiowrap.h
字号:
/************************************************** * * mp3wrap.h * * CVS ID: $Id: audiowrap.h,v 1.4 2006/09/18 09:55:21 belardi Exp $ * Author: Raffaele Belardi [RB] - STM * Date: $Date: 2006/09/18 09:55:21 $ * Revision: $Revision: 1.4 $ * * Description: * * Wrapper functions around the ARM MP3 library functions. * *************************************************** * * COPYRIGHT (C) ST Microelectronics 2005 * All Rights Reserved * **************************************************** * * STM CVS Log: * * $Log: audiowrap.h,v $ * Revision 1.4 2006/09/18 09:55:21 belardi * Corrected CVS keyword usage * * Revision 1.3 2006/09/18 09:23:01 belardi * Added Log CVS keyword into file header * * ***************************************************/#ifndef _AUDIOWRAP_H_#define _AUDIOWRAP_H_#include "decoder_task.h"typedef enum AudioDecoderState_tag { notInitializedAudioDec, waitingFrameDataAudioDec, decodingBlocksAudioDec, waitingAudioBufferHeaderAudioDec, waitingAudioBufferAudioDec, waitingAudioBufferEOFAudioDec, fatalErrorAudioDec} AudioDecoderStateType;// Used by MPeDecode() to check if the SRC was already initializedtypedef enum AudioUpdateStatus_tag { dataReadyAudioDec, waitingForDataAudioDec, immediateEOFAudioDec, dataErrorAudioDec, dataEOFAudioDec} AudioUpdateStatus;typedef struct tagAudioDecoderBitstream{/* output/updated */ /* the next data offset requested by the decoder from the address in the bitstream referenced by 'data'; all 'dataOffset' bytes in memory from 'data' can be discarded. This value may be set negative by the decoder only if the BitstreamSeekBytes or BitstreamSeekTime functions are called with the first parameter (offset) being negative. At all other times, this value will be positive */ int dataOffset ; /* the next number of bytes required by the decoder to make some progress; this is guaranteed to be less than or equal to the value of 'inputSize' returned in the decoder requirements */ unsigned int dataRequired ;/* input */ /* pointer to the next bitstream bytes */ unsigned char *data ; /* the number of input bytes presented to the decoder. */ unsigned int dataLength ; } sAudioDecoderBitstream ;typedef struct{ uint8 flags_4n; uint8 flags_4np1; uint8 flags_4np2; uint8 flags_4np3;} C2_FLAGS_STRUCT;typedef union{ C2_FLAGS_STRUCT field; uint32 all;} C2_FLAGS_UNION;//#define outputBufferSamplesNumber 1152//#define sizeOfSampleInBytes 2// Function prototypesvoid AudioInit(void);decoderReturnType AudioDecode(int flag);void AudioKill(DecoderKillType);#endif //_MP3WRAP_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -