⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pmp2dec_lib.h

📁 瑞星微公司RK27XX系列芯片的SDK开发包
💻 H
字号:
#define MP2_PCM_BUFFER_SIZE  (MP2_MAX_PCM_LENGTH * 3)
#define MP2_ENCODED_DATA_SIZE  (2048)
#define pENCODED_DATA  (pMP2->pcEncodedData)
typedef struct
{
    // A pointer to the buffer containing the persistent internal state of the
    // MP3 decoder library.
    tMP2Instance *pMPEGInstance;

    // The file from which we read data.
    // tFile *pFile;

    // A buffer to contain the encoded MP3 audio.

    char pcEncodedData[MP2_ENCODED_DATA_SIZE];

    // Buffers to contain the decoded MP3 audio.
    short psLeft[MP2_PCM_BUFFER_SIZE];
    short psRight[MP2_PCM_BUFFER_SIZE];

    // The buffer to which we write decoded MP3 data.
    BufferState *pOutput;

    // The MP3 bitstream pointer.
    tMP2Bitstream sBS;

    // The decoded MP3 header information.
    tMP2Header sHdr;

    // The status returned by MP3DecodeData().
    tMP2Status sStatus;



    // The number of bytes in pcEncodedData which contain valid encoded MP3
    // data.
    unsigned short usValid;

    // The sample rate of the decoded PCM stream.
    unsigned short usSampleRate;

    // The number of channels in the file.
    unsigned char ucChannels;

    // A boolean which is true if this file uses VBR.
    unsigned char ucIsVBR;

    // The offset of the first frame of the file.
    unsigned long ulFirstFrame;

    // The byte length of the file.
    unsigned long ulLength;

    // The time length of the file.
    unsigned long ulTimeLength;

    // The bit rate of the MP3 file.
    unsigned long ulBitRate;

    // The number of samples which have been decoded.
    unsigned long ulTimePos;

} tMP2;

extern unsigned short usSRMap2[], usBRMap2[];

extern void MP2InitBitstream(tMP2 *pMP2, unsigned long ulFilePos);
extern unsigned long GetFirstFrame_MP2(unsigned char* MP2Data);
extern unsigned long MP2FindNextFrame(tMP2 *pMP2);
extern unsigned long MP2DecodeVBRHeader(tMP2 *pMP2);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -