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

Go to the source code of this file.

Classes

struct  drflac_seekpoint
 
struct  drflac_streaminfo
 
struct  drflac_metadata
 
struct  drflac__memory_stream
 
struct  drflac_bs
 
struct  drflac_subframe
 
struct  drflac_frame_header
 
struct  drflac_frame
 
struct  drflac
 
struct  drflac_vorbis_comment_iterator
 

Macros

#define DR_FLAC_NO_STDIO
 
#define DRFLAC_TRUE   1
 
#define DRFLAC_FALSE   0
 
#define DR_FLAC_BUFFER_SIZE   4096
 
#define DRFLAC_METADATA_BLOCK_TYPE_STREAMINFO   0
 
#define DRFLAC_METADATA_BLOCK_TYPE_PADDING   1
 
#define DRFLAC_METADATA_BLOCK_TYPE_APPLICATION   2
 
#define DRFLAC_METADATA_BLOCK_TYPE_SEEKTABLE   3
 
#define DRFLAC_METADATA_BLOCK_TYPE_VORBIS_COMMENT   4
 
#define DRFLAC_METADATA_BLOCK_TYPE_CUESHEET   5
 
#define DRFLAC_METADATA_BLOCK_TYPE_PICTURE   6
 
#define DRFLAC_METADATA_BLOCK_TYPE_INVALID   127
 
#define DRFLAC_PICTURE_TYPE_OTHER   0
 
#define DRFLAC_PICTURE_TYPE_FILE_ICON   1
 
#define DRFLAC_PICTURE_TYPE_OTHER_FILE_ICON   2
 
#define DRFLAC_PICTURE_TYPE_COVER_FRONT   3
 
#define DRFLAC_PICTURE_TYPE_COVER_BACK   4
 
#define DRFLAC_PICTURE_TYPE_LEAFLET_PAGE   5
 
#define DRFLAC_PICTURE_TYPE_MEDIA   6
 
#define DRFLAC_PICTURE_TYPE_LEAD_ARTIST   7
 
#define DRFLAC_PICTURE_TYPE_ARTIST   8
 
#define DRFLAC_PICTURE_TYPE_CONDUCTOR   9
 
#define DRFLAC_PICTURE_TYPE_BAND   10
 
#define DRFLAC_PICTURE_TYPE_COMPOSER   11
 
#define DRFLAC_PICTURE_TYPE_LYRICIST   12
 
#define DRFLAC_PICTURE_TYPE_RECORDING_LOCATION   13
 
#define DRFLAC_PICTURE_TYPE_DURING_RECORDING   14
 
#define DRFLAC_PICTURE_TYPE_DURING_PERFORMANCE   15
 
#define DRFLAC_PICTURE_TYPE_SCREEN_CAPTURE   16
 
#define DRFLAC_PICTURE_TYPE_BRIGHT_COLORED_FISH   17
 
#define DRFLAC_PICTURE_TYPE_ILLUSTRATION   18
 
#define DRFLAC_PICTURE_TYPE_BAND_LOGOTYPE   19
 
#define DRFLAC_PICTURE_TYPE_PUBLISHER_LOGOTYPE   20
 

Typedefs

typedef int8_t drflac_int8
 
typedef uint8_t drflac_uint8
 
typedef int16_t drflac_int16
 
typedef uint16_t drflac_uint16
 
typedef int32_t drflac_int32
 
typedef uint32_t drflac_uint32
 
typedef int64_t drflac_int64
 
typedef uint64_t drflac_uint64
 
typedef drflac_uint8 drflac_bool8
 
typedef drflac_uint32 drflac_bool32
 
typedef drflac_uint32 drflac_cache_t
 
typedef size_t(* drflac_read_proc) (void *pUserData, void *pBufferOut, size_t bytesToRead)
 
typedef drflac_bool32(* drflac_seek_proc) (void *pUserData, int offset, drflac_seek_origin origin)
 
typedef void(* drflac_meta_proc) (void *pUserData, drflac_metadata *pMetadata)
 

Enumerations

enum  drflac_container { drflac_container_native, drflac_container_ogg, drflac_container_unknown }
 
enum  drflac_seek_origin { drflac_seek_origin_start, drflac_seek_origin_current }
 

Functions

drflacdrflac_open (drflac_read_proc onRead, drflac_seek_proc onSeek, void *pUserData)
 
drflacdrflac_open_relaxed (drflac_read_proc onRead, drflac_seek_proc onSeek, drflac_container container, void *pUserData)
 
drflacdrflac_open_with_metadata (drflac_read_proc onRead, drflac_seek_proc onSeek, drflac_meta_proc onMeta, void *pUserData)
 
drflacdrflac_open_with_metadata_relaxed (drflac_read_proc onRead, drflac_seek_proc onSeek, drflac_meta_proc onMeta, drflac_container container, void *pUserData)
 
void drflac_close (drflac *pFlac)
 
drflac_uint64 drflac_read_s32 (drflac *pFlac, drflac_uint64 samplesToRead, drflac_int32 *pBufferOut)
 
drflac_uint64 drflac_read_s16 (drflac *pFlac, drflac_uint64 samplesToRead, drflac_int16 *pBufferOut)
 
drflac_uint64 drflac_read_f32 (drflac *pFlac, drflac_uint64 samplesToRead, float *pBufferOut)
 
drflac_bool32 drflac_seek_to_sample (drflac *pFlac, drflac_uint64 sampleIndex)
 
drflacdrflac_open_memory (const void *data, size_t dataSize)
 
drflacdrflac_open_memory_with_metadata (const void *data, size_t dataSize, drflac_meta_proc onMeta, void *pUserData)
 
drflac_int32drflac_open_and_decode_s32 (drflac_read_proc onRead, drflac_seek_proc onSeek, void *pUserData, unsigned int *channels, unsigned int *sampleRate, drflac_uint64 *totalSampleCount)
 
drflac_int16drflac_open_and_decode_s16 (drflac_read_proc onRead, drflac_seek_proc onSeek, void *pUserData, unsigned int *channels, unsigned int *sampleRate, drflac_uint64 *totalSampleCount)
 
float * drflac_open_and_decode_f32 (drflac_read_proc onRead, drflac_seek_proc onSeek, void *pUserData, unsigned int *channels, unsigned int *sampleRate, drflac_uint64 *totalSampleCount)
 
drflac_int32drflac_open_and_decode_memory_s32 (const void *data, size_t dataSize, unsigned int *channels, unsigned int *sampleRate, drflac_uint64 *totalSampleCount)
 
drflac_int16drflac_open_and_decode_memory_s16 (const void *data, size_t dataSize, unsigned int *channels, unsigned int *sampleRate, drflac_uint64 *totalSampleCount)
 
float * drflac_open_and_decode_memory_f32 (const void *data, size_t dataSize, unsigned int *channels, unsigned int *sampleRate, drflac_uint64 *totalSampleCount)
 
void drflac_free (void *p)
 
void drflac_init_vorbis_comment_iterator (drflac_vorbis_comment_iterator *pIter, drflac_uint32 commentCount, const char *pComments)
 
const char * drflac_next_vorbis_comment (drflac_vorbis_comment_iterator *pIter, drflac_uint32 *pCommentLengthOut)
 

Macro Definition Documentation

◆ DR_FLAC_BUFFER_SIZE

#define DR_FLAC_BUFFER_SIZE   4096

◆ DR_FLAC_NO_STDIO

#define DR_FLAC_NO_STDIO

◆ DRFLAC_FALSE

#define DRFLAC_FALSE   0

◆ DRFLAC_METADATA_BLOCK_TYPE_APPLICATION

#define DRFLAC_METADATA_BLOCK_TYPE_APPLICATION   2

◆ DRFLAC_METADATA_BLOCK_TYPE_CUESHEET

#define DRFLAC_METADATA_BLOCK_TYPE_CUESHEET   5

◆ DRFLAC_METADATA_BLOCK_TYPE_INVALID

#define DRFLAC_METADATA_BLOCK_TYPE_INVALID   127

◆ DRFLAC_METADATA_BLOCK_TYPE_PADDING

#define DRFLAC_METADATA_BLOCK_TYPE_PADDING   1

◆ DRFLAC_METADATA_BLOCK_TYPE_PICTURE

#define DRFLAC_METADATA_BLOCK_TYPE_PICTURE   6

◆ DRFLAC_METADATA_BLOCK_TYPE_SEEKTABLE

#define DRFLAC_METADATA_BLOCK_TYPE_SEEKTABLE   3

◆ DRFLAC_METADATA_BLOCK_TYPE_STREAMINFO

#define DRFLAC_METADATA_BLOCK_TYPE_STREAMINFO   0

◆ DRFLAC_METADATA_BLOCK_TYPE_VORBIS_COMMENT

#define DRFLAC_METADATA_BLOCK_TYPE_VORBIS_COMMENT   4

◆ DRFLAC_PICTURE_TYPE_ARTIST

#define DRFLAC_PICTURE_TYPE_ARTIST   8

◆ DRFLAC_PICTURE_TYPE_BAND

#define DRFLAC_PICTURE_TYPE_BAND   10

◆ DRFLAC_PICTURE_TYPE_BAND_LOGOTYPE

#define DRFLAC_PICTURE_TYPE_BAND_LOGOTYPE   19

◆ DRFLAC_PICTURE_TYPE_BRIGHT_COLORED_FISH

#define DRFLAC_PICTURE_TYPE_BRIGHT_COLORED_FISH   17

◆ DRFLAC_PICTURE_TYPE_COMPOSER

#define DRFLAC_PICTURE_TYPE_COMPOSER   11

◆ DRFLAC_PICTURE_TYPE_CONDUCTOR

#define DRFLAC_PICTURE_TYPE_CONDUCTOR   9

◆ DRFLAC_PICTURE_TYPE_COVER_BACK

#define DRFLAC_PICTURE_TYPE_COVER_BACK   4

◆ DRFLAC_PICTURE_TYPE_COVER_FRONT

#define DRFLAC_PICTURE_TYPE_COVER_FRONT   3

◆ DRFLAC_PICTURE_TYPE_DURING_PERFORMANCE

#define DRFLAC_PICTURE_TYPE_DURING_PERFORMANCE   15

◆ DRFLAC_PICTURE_TYPE_DURING_RECORDING

#define DRFLAC_PICTURE_TYPE_DURING_RECORDING   14

◆ DRFLAC_PICTURE_TYPE_FILE_ICON

#define DRFLAC_PICTURE_TYPE_FILE_ICON   1

◆ DRFLAC_PICTURE_TYPE_ILLUSTRATION

#define DRFLAC_PICTURE_TYPE_ILLUSTRATION   18

◆ DRFLAC_PICTURE_TYPE_LEAD_ARTIST

#define DRFLAC_PICTURE_TYPE_LEAD_ARTIST   7

◆ DRFLAC_PICTURE_TYPE_LEAFLET_PAGE

#define DRFLAC_PICTURE_TYPE_LEAFLET_PAGE   5

◆ DRFLAC_PICTURE_TYPE_LYRICIST

#define DRFLAC_PICTURE_TYPE_LYRICIST   12

◆ DRFLAC_PICTURE_TYPE_MEDIA

#define DRFLAC_PICTURE_TYPE_MEDIA   6

◆ DRFLAC_PICTURE_TYPE_OTHER

#define DRFLAC_PICTURE_TYPE_OTHER   0

◆ DRFLAC_PICTURE_TYPE_OTHER_FILE_ICON

#define DRFLAC_PICTURE_TYPE_OTHER_FILE_ICON   2

◆ DRFLAC_PICTURE_TYPE_PUBLISHER_LOGOTYPE

#define DRFLAC_PICTURE_TYPE_PUBLISHER_LOGOTYPE   20

◆ DRFLAC_PICTURE_TYPE_RECORDING_LOCATION

#define DRFLAC_PICTURE_TYPE_RECORDING_LOCATION   13

◆ DRFLAC_PICTURE_TYPE_SCREEN_CAPTURE

#define DRFLAC_PICTURE_TYPE_SCREEN_CAPTURE   16

◆ DRFLAC_TRUE

#define DRFLAC_TRUE   1

Typedef Documentation

◆ drflac_bool32

◆ drflac_bool8

◆ drflac_cache_t

◆ drflac_int16

◆ drflac_int32

◆ drflac_int64

◆ drflac_int8

◆ drflac_meta_proc

typedef void(* drflac_meta_proc) (void *pUserData, drflac_metadata *pMetadata)

◆ drflac_read_proc

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

◆ drflac_seek_proc

typedef drflac_bool32(* drflac_seek_proc) (void *pUserData, int offset, drflac_seek_origin origin)

◆ drflac_uint16

◆ drflac_uint32

◆ drflac_uint64

◆ drflac_uint8

Enumeration Type Documentation

◆ drflac_container

Enumerator
drflac_container_native 
drflac_container_ogg 
drflac_container_unknown 

◆ drflac_seek_origin

Enumerator
drflac_seek_origin_start 
drflac_seek_origin_current 

Function Documentation

◆ drflac_close()

void drflac_close ( drflac pFlac)

◆ drflac_free()

void drflac_free ( void p)

◆ drflac_init_vorbis_comment_iterator()

void drflac_init_vorbis_comment_iterator ( drflac_vorbis_comment_iterator pIter,
drflac_uint32  commentCount,
const char *  pComments 
)

◆ drflac_next_vorbis_comment()

const char* drflac_next_vorbis_comment ( drflac_vorbis_comment_iterator pIter,
drflac_uint32 pCommentLengthOut 
)

◆ drflac_open()

drflac* drflac_open ( drflac_read_proc  onRead,
drflac_seek_proc  onSeek,
void pUserData 
)

◆ drflac_open_and_decode_f32()

float* drflac_open_and_decode_f32 ( drflac_read_proc  onRead,
drflac_seek_proc  onSeek,
void pUserData,
unsigned int *  channels,
unsigned int *  sampleRate,
drflac_uint64 totalSampleCount 
)

◆ drflac_open_and_decode_memory_f32()

float* drflac_open_and_decode_memory_f32 ( const void data,
size_t  dataSize,
unsigned int *  channels,
unsigned int *  sampleRate,
drflac_uint64 totalSampleCount 
)

◆ drflac_open_and_decode_memory_s16()

drflac_int16* drflac_open_and_decode_memory_s16 ( const void data,
size_t  dataSize,
unsigned int *  channels,
unsigned int *  sampleRate,
drflac_uint64 totalSampleCount 
)

◆ drflac_open_and_decode_memory_s32()

drflac_int32* drflac_open_and_decode_memory_s32 ( const void data,
size_t  dataSize,
unsigned int *  channels,
unsigned int *  sampleRate,
drflac_uint64 totalSampleCount 
)

◆ drflac_open_and_decode_s16()

drflac_int16* drflac_open_and_decode_s16 ( drflac_read_proc  onRead,
drflac_seek_proc  onSeek,
void pUserData,
unsigned int *  channels,
unsigned int *  sampleRate,
drflac_uint64 totalSampleCount 
)

◆ drflac_open_and_decode_s32()

drflac_int32* drflac_open_and_decode_s32 ( drflac_read_proc  onRead,
drflac_seek_proc  onSeek,
void pUserData,
unsigned int *  channels,
unsigned int *  sampleRate,
drflac_uint64 totalSampleCount 
)

◆ drflac_open_memory()

drflac* drflac_open_memory ( const void data,
size_t  dataSize 
)

◆ drflac_open_memory_with_metadata()

drflac* drflac_open_memory_with_metadata ( const void data,
size_t  dataSize,
drflac_meta_proc  onMeta,
void pUserData 
)

◆ drflac_open_relaxed()

drflac* drflac_open_relaxed ( drflac_read_proc  onRead,
drflac_seek_proc  onSeek,
drflac_container  container,
void pUserData 
)

◆ drflac_open_with_metadata()

drflac* drflac_open_with_metadata ( drflac_read_proc  onRead,
drflac_seek_proc  onSeek,
drflac_meta_proc  onMeta,
void pUserData 
)

◆ drflac_open_with_metadata_relaxed()

drflac* drflac_open_with_metadata_relaxed ( drflac_read_proc  onRead,
drflac_seek_proc  onSeek,
drflac_meta_proc  onMeta,
drflac_container  container,
void pUserData 
)

◆ drflac_read_f32()

drflac_uint64 drflac_read_f32 ( drflac pFlac,
drflac_uint64  samplesToRead,
float *  pBufferOut 
)

◆ drflac_read_s16()

drflac_uint64 drflac_read_s16 ( drflac pFlac,
drflac_uint64  samplesToRead,
drflac_int16 pBufferOut 
)

◆ drflac_read_s32()

drflac_uint64 drflac_read_s32 ( drflac pFlac,
drflac_uint64  samplesToRead,
drflac_int32 pBufferOut 
)

◆ drflac_seek_to_sample()

drflac_bool32 drflac_seek_to_sample ( drflac pFlac,
drflac_uint64  sampleIndex 
)