RetroArch
Classes | Macros | Typedefs | Enumerations | Functions
dr_mp3.h File Reference
#include <stddef.h>
#include <stdint.h>
#include <retro_inline.h>
Include dependency graph for dr_mp3.h:

Go to the source code of this file.

Classes

struct  drmp3dec_frame_info
 
struct  drmp3dec
 
struct  drmp3_src_cache
 
struct  drmp3_src_config
 
struct  drmp3_src
 
struct  drmp3_config
 
struct  drmp3
 

Macros

#define DR_MP3_NO_STDIO
 
#define DRMP3_TRUE   1
 
#define DRMP3_FALSE   0
 
#define DRMP3_MAX_SAMPLES_PER_FRAME   (1152*2)
 
#define DRMP3_SRC_CACHE_SIZE_IN_FRAMES   512
 

Typedefs

typedef int8_t drmp3_int8
 
typedef uint8_t drmp3_uint8
 
typedef int16_t drmp3_int16
 
typedef uint16_t drmp3_uint16
 
typedef int32_t drmp3_int32
 
typedef uint32_t drmp3_uint32
 
typedef int64_t drmp3_int64
 
typedef uint64_t drmp3_uint64
 
typedef drmp3_uint8 drmp3_bool8
 
typedef drmp3_uint32 drmp3_bool32
 
typedef struct drmp3_src drmp3_src
 
typedef drmp3_uint64(* drmp3_src_read_proc) (drmp3_src *pSRC, drmp3_uint64 frameCount, void *pFramesOut, void *pUserData)
 
typedef size_t(* drmp3_read_proc) (void *pUserData, void *pBufferOut, size_t bytesToRead)
 
typedef drmp3_bool32(* drmp3_seek_proc) (void *pUserData, int offset, drmp3_seek_origin origin)
 

Enumerations

enum  drmp3_src_algorithm { drmp3_src_algorithm_none, drmp3_src_algorithm_linear }
 
enum  drmp3_seek_origin { drmp3_seek_origin_start, drmp3_seek_origin_current }
 

Functions

void drmp3dec_init (drmp3dec *dec)
 
int drmp3dec_decode_frame (drmp3dec *dec, const unsigned char *mp3, int mp3_bytes, short *pcm, drmp3dec_frame_info *info)
 
drmp3_bool32 drmp3_init (drmp3 *pMP3, drmp3_read_proc onRead, drmp3_seek_proc onSeek, void *pUserData, const drmp3_config *pConfig)
 
drmp3_bool32 drmp3_init_memory (drmp3 *pMP3, const void *pData, size_t dataSize, const drmp3_config *pConfig)
 
void drmp3_uninit (drmp3 *pMP3)
 
drmp3_uint64 drmp3_read_f32 (drmp3 *pMP3, drmp3_uint64 framesToRead, float *pBufferOut)
 
drmp3_bool32 drmp3_seek_to_frame (drmp3 *pMP3, drmp3_uint64 frameIndex)
 
float * drmp3_open_and_decode_f32 (drmp3_read_proc onRead, drmp3_seek_proc onSeek, void *pUserData, drmp3_config *pConfig, drmp3_uint64 *pTotalFrameCount)
 
float * drmp3_open_and_decode_memory_f32 (const void *pData, size_t dataSize, drmp3_config *pConfig, drmp3_uint64 *pTotalFrameCount)
 
void drmp3_free (void *p)
 

Macro Definition Documentation

◆ DR_MP3_NO_STDIO

#define DR_MP3_NO_STDIO

◆ DRMP3_FALSE

#define DRMP3_FALSE   0

◆ DRMP3_MAX_SAMPLES_PER_FRAME

#define DRMP3_MAX_SAMPLES_PER_FRAME   (1152*2)

◆ DRMP3_SRC_CACHE_SIZE_IN_FRAMES

#define DRMP3_SRC_CACHE_SIZE_IN_FRAMES   512

◆ DRMP3_TRUE

#define DRMP3_TRUE   1

Typedef Documentation

◆ drmp3_bool32

◆ drmp3_bool8

◆ drmp3_int16

◆ drmp3_int32

◆ drmp3_int64

◆ drmp3_int8

typedef int8_t drmp3_int8

◆ drmp3_read_proc

typedef size_t(* drmp3_read_proc) (void *pUserData, void *pBufferOut, size_t bytesToRead)

◆ drmp3_seek_proc

typedef drmp3_bool32(* drmp3_seek_proc) (void *pUserData, int offset, drmp3_seek_origin origin)

◆ drmp3_src

typedef struct drmp3_src drmp3_src

◆ drmp3_src_read_proc

typedef drmp3_uint64(* drmp3_src_read_proc) (drmp3_src *pSRC, drmp3_uint64 frameCount, void *pFramesOut, void *pUserData)

◆ drmp3_uint16

◆ drmp3_uint32

◆ drmp3_uint64

◆ drmp3_uint8

Enumeration Type Documentation

◆ drmp3_seek_origin

Enumerator
drmp3_seek_origin_start 
drmp3_seek_origin_current 

◆ drmp3_src_algorithm

Enumerator
drmp3_src_algorithm_none 
drmp3_src_algorithm_linear 

Function Documentation

◆ drmp3_free()

void drmp3_free ( void p)

◆ drmp3_init()

drmp3_bool32 drmp3_init ( drmp3 pMP3,
drmp3_read_proc  onRead,
drmp3_seek_proc  onSeek,
void pUserData,
const drmp3_config pConfig 
)

◆ drmp3_init_memory()

drmp3_bool32 drmp3_init_memory ( drmp3 pMP3,
const void pData,
size_t  dataSize,
const drmp3_config pConfig 
)

◆ drmp3_open_and_decode_f32()

float* drmp3_open_and_decode_f32 ( drmp3_read_proc  onRead,
drmp3_seek_proc  onSeek,
void pUserData,
drmp3_config pConfig,
drmp3_uint64 pTotalFrameCount 
)

◆ drmp3_open_and_decode_memory_f32()

float* drmp3_open_and_decode_memory_f32 ( const void pData,
size_t  dataSize,
drmp3_config pConfig,
drmp3_uint64 pTotalFrameCount 
)

◆ drmp3_read_f32()

drmp3_uint64 drmp3_read_f32 ( drmp3 pMP3,
drmp3_uint64  framesToRead,
float *  pBufferOut 
)

◆ drmp3_seek_to_frame()

drmp3_bool32 drmp3_seek_to_frame ( drmp3 pMP3,
drmp3_uint64  frameIndex 
)

◆ drmp3_uninit()

void drmp3_uninit ( drmp3 pMP3)

◆ drmp3dec_decode_frame()

int drmp3dec_decode_frame ( drmp3dec dec,
const unsigned char *  mp3,
int  mp3_bytes,
short *  pcm,
drmp3dec_frame_info info 
)

◆ drmp3dec_init()

void drmp3dec_init ( drmp3dec dec)