OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
mp3dec.h File Reference

Go to the source code of this file.

Data Structures

struct  _MP3FrameInfo
 

Macros

#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 */
 

Typedefs

typedef void * HMP3Decoder
 
typedef struct _MP3FrameInfo MP3FrameInfo
 

Enumerations

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_UNKNOWN = -9999
}
 

Functions

HMP3Decoder MP3InitDecoder (void)
 
void MP3FreeDecoder (HMP3Decoder hMP3Decoder)
 
int MP3Decode (HMP3Decoder hMP3Decoder, unsigned char **inbuf, int *bytesLeft, short *outbuf, int useSize)
 
void MP3GetLastFrameInfo (HMP3Decoder hMP3Decoder, MP3FrameInfo *mp3FrameInfo)
 
int MP3GetNextFrameInfo (HMP3Decoder hMP3Decoder, MP3FrameInfo *mp3FrameInfo, unsigned char *buf)
 
int MP3FindSyncWord (unsigned char *buf, int nBytes)
 

Macro Definition Documentation

◆ MAINBUF_SIZE

#define MAINBUF_SIZE   1940

Definition at line 76 of file mp3dec.h.

◆ MAX_NCHAN

#define MAX_NCHAN   2 /* max channels */

Definition at line 79 of file mp3dec.h.

◆ MAX_NGRAN

#define MAX_NGRAN   2 /* max granules */

Definition at line 78 of file mp3dec.h.

◆ MAX_NSAMP

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

Definition at line 80 of file mp3dec.h.

Typedef Documentation

◆ HMP3Decoder

typedef void* HMP3Decoder

Definition at line 89 of file mp3dec.h.

◆ MP3FrameInfo

typedef struct _MP3FrameInfo MP3FrameInfo

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
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_UNKNOWN 

Definition at line 91 of file mp3dec.h.

◆ MPEGVersion

Enumerator
MPEG1 
MPEG2 
MPEG25 

Definition at line 83 of file mp3dec.h.

Function Documentation

◆ MP3Decode()

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

Definition at line 285 of file mp3dec.c.

◆ MP3FindSyncWord()

int MP3FindSyncWord ( unsigned char * buf,
int nBytes )

Definition at line 109 of file mp3dec.c.

◆ MP3FreeDecoder()

void MP3FreeDecoder ( HMP3Decoder hMP3Decoder)

Definition at line 86 of file mp3dec.c.

◆ MP3GetLastFrameInfo()

void MP3GetLastFrameInfo ( HMP3Decoder hMP3Decoder,
MP3FrameInfo * mp3FrameInfo )

Definition at line 189 of file mp3dec.c.

◆ MP3GetNextFrameInfo()

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

Definition at line 226 of file mp3dec.c.

◆ MP3InitDecoder()

HMP3Decoder MP3InitDecoder ( void )

Definition at line 65 of file mp3dec.c.