#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <assert.h>
#include <stdio.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_seek_point |
struct | drmp3_config |
struct | drmp3 |
Macros | |
#define | DRMP3_TRUE 1 |
#define | DRMP3_FALSE 0 |
#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_INLINE |
#define | DR_MP3_DEFAULT_CHANNELS 2 |
#define | DR_MP3_DEFAULT_SAMPLE_RATE 44100 |
#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 } |
#define DRMP3_MAX_SAMPLES_PER_FRAME (DRMP3_MAX_PCM_FRAMES_PER_MP3_FRAME*2) |
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 drmp3_bool32(* drmp3_seek_proc) (void *pUserData, int offset, drmp3_seek_origin origin) |
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 |
enum drmp3_seek_origin |
enum drmp3_src_algorithm |
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 | ||
) |
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 | ||
) |
drmp3_bool32 drmp3_init_file | ( | drmp3 * | pMP3, |
const char * | filePath, | ||
const drmp3_config * | pConfig | ||
) |
drmp3_bool32 drmp3_init_memory | ( | drmp3 * | pMP3, |
const void * | pData, | ||
size_t | dataSize, | ||
const drmp3_config * | pConfig | ||
) |
float* drmp3_open_and_read_f32 | ( | drmp3_read_proc | onRead, |
drmp3_seek_proc | onSeek, | ||
void * | pUserData, | ||
drmp3_config * | pConfig, | ||
drmp3_uint64 * | pTotalFrameCount | ||
) |
drmp3_int16* drmp3_open_and_read_s16 | ( | drmp3_read_proc | onRead, |
drmp3_seek_proc | onSeek, | ||
void * | pUserData, | ||
drmp3_config * | pConfig, | ||
drmp3_uint64 * | pTotalFrameCount | ||
) |
float* drmp3_open_file_and_read_f32 | ( | const char * | filePath, |
drmp3_config * | pConfig, | ||
drmp3_uint64 * | pTotalFrameCount | ||
) |
drmp3_int16* drmp3_open_file_and_read_s16 | ( | const char * | filePath, |
drmp3_config * | pConfig, | ||
drmp3_uint64 * | pTotalFrameCount | ||
) |
float* drmp3_open_memory_and_read_f32 | ( | const void * | pData, |
size_t | dataSize, | ||
drmp3_config * | pConfig, | ||
drmp3_uint64 * | pTotalFrameCount | ||
) |
drmp3_int16* drmp3_open_memory_and_read_s16 | ( | const void * | pData, |
size_t | dataSize, | ||
drmp3_config * | pConfig, | ||
drmp3_uint64 * | pTotalFrameCount | ||
) |
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 | ||
) |
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 | ||
) |