Classes | Macros | Typedefs | Enumerations | Functions
porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/dr_mp3.h File Reference
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <assert.h>
#include <stdio.h>
Include dependency graph for porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/dr_mp3.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

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

Macros

#define DR_MP3_DEFAULT_CHANNELS   2
 
#define DR_MP3_DEFAULT_SAMPLE_RATE   44100
 
#define DRMP3_FALSE   0
 
#define DRMP3_INLINE
 
#define DRMP3_MAX_PCM_FRAMES_PER_MP3_FRAME   1152
 
#define DRMP3_MAX_SAMPLES_PER_FRAME   (DRMP3_MAX_PCM_FRAMES_PER_MP3_FRAME*2)
 
#define DRMP3_SRC_CACHE_SIZE_IN_FRAMES   512
 
#define DRMP3_TRUE   1
 

Typedefs

typedef drmp3_uint32 drmp3_bool32
 
typedef drmp3_uint8 drmp3_bool8
 
typedef int16_t drmp3_int16
 
typedef int32_t drmp3_int32
 
typedef int64_t drmp3_int64
 
typedef int8_t drmp3_int8
 
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)
 
typedef struct drmp3_src drmp3_src
 
typedef drmp3_uint64(* drmp3_src_read_proc) (drmp3_src *pSRC, drmp3_uint64 frameCount, void *pFramesOut, void *pUserData)
 
typedef uint16_t drmp3_uint16
 
typedef uint32_t drmp3_uint32
 
typedef uint64_t drmp3_uint64
 
typedef uint8_t drmp3_uint8
 

Enumerations

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

Functions

drmp3_bool32 drmp3_bind_seek_table (drmp3 *pMP3, drmp3_uint32 seekPointCount, drmp3_seek_point *pSeekPoints)
 
drmp3_bool32 drmp3_calculate_seek_points (drmp3 *pMP3, drmp3_uint32 *pSeekPointCount, drmp3_seek_point *pSeekPoints)
 
void drmp3_free (void *p, const drmp3_allocation_callbacks *pAllocationCallbacks)
 
drmp3_bool32 drmp3_get_mp3_and_pcm_frame_count (drmp3 *pMP3, drmp3_uint64 *pMP3FrameCount, drmp3_uint64 *pPCMFrameCount)
 
drmp3_uint64 drmp3_get_mp3_frame_count (drmp3 *pMP3)
 
drmp3_uint64 drmp3_get_pcm_frame_count (drmp3 *pMP3)
 
drmp3_bool32 drmp3_init (drmp3 *pMP3, drmp3_read_proc onRead, drmp3_seek_proc onSeek, void *pUserData, const drmp3_config *pConfig, const drmp3_allocation_callbacks *pAllocationCallbacks)
 
drmp3_bool32 drmp3_init_file (drmp3 *pMP3, const char *filePath, const drmp3_config *pConfig, const drmp3_allocation_callbacks *pAllocationCallbacks)
 
drmp3_bool32 drmp3_init_memory (drmp3 *pMP3, const void *pData, size_t dataSize, const drmp3_config *pConfig, const drmp3_allocation_callbacks *pAllocationCallbacks)
 
float * drmp3_open_and_read_pcm_frames_f32 (drmp3_read_proc onRead, drmp3_seek_proc onSeek, void *pUserData, drmp3_config *pConfig, drmp3_uint64 *pTotalFrameCount, const drmp3_allocation_callbacks *pAllocationCallbacks)
 
drmp3_int16drmp3_open_and_read_pcm_frames_s16 (drmp3_read_proc onRead, drmp3_seek_proc onSeek, void *pUserData, drmp3_config *pConfig, drmp3_uint64 *pTotalFrameCount, const drmp3_allocation_callbacks *pAllocationCallbacks)
 
float * drmp3_open_file_and_read_pcm_frames_f32 (const char *filePath, drmp3_config *pConfig, drmp3_uint64 *pTotalFrameCount, const drmp3_allocation_callbacks *pAllocationCallbacks)
 
drmp3_int16drmp3_open_file_and_read_pcm_frames_s16 (const char *filePath, drmp3_config *pConfig, drmp3_uint64 *pTotalFrameCount, const drmp3_allocation_callbacks *pAllocationCallbacks)
 
float * drmp3_open_memory_and_read_pcm_frames_f32 (const void *pData, size_t dataSize, drmp3_config *pConfig, drmp3_uint64 *pTotalFrameCount, const drmp3_allocation_callbacks *pAllocationCallbacks)
 
drmp3_int16drmp3_open_memory_and_read_pcm_frames_s16 (const void *pData, size_t dataSize, drmp3_config *pConfig, drmp3_uint64 *pTotalFrameCount, const drmp3_allocation_callbacks *pAllocationCallbacks)
 
drmp3_uint64 drmp3_read_pcm_frames_f32 (drmp3 *pMP3, drmp3_uint64 framesToRead, float *pBufferOut)
 
drmp3_uint64 drmp3_read_pcm_frames_s16 (drmp3 *pMP3, drmp3_uint64 framesToRead, drmp3_int16 *pBufferOut)
 
drmp3_bool32 drmp3_seek_to_pcm_frame (drmp3 *pMP3, drmp3_uint64 frameIndex)
 
void drmp3_uninit (drmp3 *pMP3)
 
int drmp3dec_decode_frame (drmp3dec *dec, const unsigned char *mp3, int mp3_bytes, void *pcm, drmp3dec_frame_info *info)
 
void drmp3dec_f32_to_s16 (const float *in, drmp3_int16 *out, int num_samples)
 
void drmp3dec_init (drmp3dec *dec)
 

Macro Definition Documentation

◆ DR_MP3_DEFAULT_CHANNELS

#define DR_MP3_DEFAULT_CHANNELS   2

◆ DR_MP3_DEFAULT_SAMPLE_RATE

#define DR_MP3_DEFAULT_SAMPLE_RATE   44100

◆ DRMP3_FALSE

#define DRMP3_FALSE   0

◆ DRMP3_INLINE

#define DRMP3_INLINE

◆ DRMP3_MAX_PCM_FRAMES_PER_MP3_FRAME

#define DRMP3_MAX_PCM_FRAMES_PER_MP3_FRAME   1152

◆ DRMP3_MAX_SAMPLES_PER_FRAME

#define DRMP3_MAX_SAMPLES_PER_FRAME   (DRMP3_MAX_PCM_FRAMES_PER_MP3_FRAME*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

typedef int16_t drmp3_int16

◆ drmp3_int32

typedef int32_t drmp3_int32

◆ drmp3_int64

typedef int64_t 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

typedef uint16_t drmp3_uint16

◆ drmp3_uint32

typedef uint32_t drmp3_uint32

◆ drmp3_uint64

typedef uint64_t drmp3_uint64

◆ drmp3_uint8

typedef uint8_t drmp3_uint8

Enumeration Type Documentation

◆ drmp3_seek_origin

Enumerator
drmp3_seek_origin_start 
drmp3_seek_origin_current 
drmp3_seek_origin_start 
drmp3_seek_origin_current 
drmp3_seek_origin_start 
drmp3_seek_origin_current 
drmp3_seek_origin_start 
drmp3_seek_origin_current 
drmp3_seek_origin_start 
drmp3_seek_origin_current 
drmp3_seek_origin_start 
drmp3_seek_origin_current 
drmp3_seek_origin_start 
drmp3_seek_origin_current 
drmp3_seek_origin_start 
drmp3_seek_origin_current 
drmp3_seek_origin_start 
drmp3_seek_origin_current 
drmp3_seek_origin_start 
drmp3_seek_origin_current 

Definition at line 264 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/dr_mp3.h.

◆ drmp3_src_algorithm

Enumerator
drmp3_src_algorithm_none 
drmp3_src_algorithm_linear 
drmp3_src_algorithm_none 
drmp3_src_algorithm_linear 

Definition at line 222 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/dr_mp3.h.

Function Documentation

◆ drmp3_bind_seek_table()

drmp3_bool32 drmp3_bind_seek_table ( drmp3 pMP3,
drmp3_uint32  seekPointCount,
drmp3_seek_point pSeekPoints 
)

◆ drmp3_calculate_seek_points()

drmp3_bool32 drmp3_calculate_seek_points ( drmp3 pMP3,
drmp3_uint32 pSeekPointCount,
drmp3_seek_point pSeekPoints 
)

◆ drmp3_free()

void drmp3_free ( void *  p,
const drmp3_allocation_callbacks pAllocationCallbacks 
)

◆ drmp3_get_mp3_and_pcm_frame_count()

drmp3_bool32 drmp3_get_mp3_and_pcm_frame_count ( drmp3 pMP3,
drmp3_uint64 pMP3FrameCount,
drmp3_uint64 pPCMFrameCount 
)

◆ drmp3_get_mp3_frame_count()

drmp3_uint64 drmp3_get_mp3_frame_count ( drmp3 pMP3)

◆ drmp3_get_pcm_frame_count()

drmp3_uint64 drmp3_get_pcm_frame_count ( drmp3 pMP3)

◆ drmp3_init()

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

◆ drmp3_init_file()

drmp3_bool32 drmp3_init_file ( drmp3 pMP3,
const char *  filePath,
const drmp3_config pConfig,
const drmp3_allocation_callbacks pAllocationCallbacks 
)

◆ drmp3_init_memory()

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

◆ drmp3_open_and_read_pcm_frames_f32()

float* drmp3_open_and_read_pcm_frames_f32 ( drmp3_read_proc  onRead,
drmp3_seek_proc  onSeek,
void *  pUserData,
drmp3_config pConfig,
drmp3_uint64 pTotalFrameCount,
const drmp3_allocation_callbacks pAllocationCallbacks 
)

◆ drmp3_open_and_read_pcm_frames_s16()

drmp3_int16* drmp3_open_and_read_pcm_frames_s16 ( drmp3_read_proc  onRead,
drmp3_seek_proc  onSeek,
void *  pUserData,
drmp3_config pConfig,
drmp3_uint64 pTotalFrameCount,
const drmp3_allocation_callbacks pAllocationCallbacks 
)

◆ drmp3_open_file_and_read_pcm_frames_f32()

float* drmp3_open_file_and_read_pcm_frames_f32 ( const char *  filePath,
drmp3_config pConfig,
drmp3_uint64 pTotalFrameCount,
const drmp3_allocation_callbacks pAllocationCallbacks 
)

◆ drmp3_open_file_and_read_pcm_frames_s16()

drmp3_int16* drmp3_open_file_and_read_pcm_frames_s16 ( const char *  filePath,
drmp3_config pConfig,
drmp3_uint64 pTotalFrameCount,
const drmp3_allocation_callbacks pAllocationCallbacks 
)

◆ drmp3_open_memory_and_read_pcm_frames_f32()

float* drmp3_open_memory_and_read_pcm_frames_f32 ( const void *  pData,
size_t  dataSize,
drmp3_config pConfig,
drmp3_uint64 pTotalFrameCount,
const drmp3_allocation_callbacks pAllocationCallbacks 
)

◆ drmp3_open_memory_and_read_pcm_frames_s16()

drmp3_int16* drmp3_open_memory_and_read_pcm_frames_s16 ( const void *  pData,
size_t  dataSize,
drmp3_config pConfig,
drmp3_uint64 pTotalFrameCount,
const drmp3_allocation_callbacks pAllocationCallbacks 
)

◆ drmp3_read_pcm_frames_f32()

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

◆ drmp3_read_pcm_frames_s16()

drmp3_uint64 drmp3_read_pcm_frames_s16 ( drmp3 pMP3,
drmp3_uint64  framesToRead,
drmp3_int16 pBufferOut 
)

◆ drmp3_seek_to_pcm_frame()

drmp3_bool32 drmp3_seek_to_pcm_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,
void *  pcm,
drmp3dec_frame_info info 
)

◆ drmp3dec_f32_to_s16()

void drmp3dec_f32_to_s16 ( const float *  in,
drmp3_int16 out,
int  num_samples 
)

◆ drmp3dec_init()

void drmp3dec_init ( drmp3dec dec)


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:57