|
LMMS
|
Go to the source code of this file.
Classes | |
| struct | mp3dec_file_info_t |
| struct | mp3dec_map_info_t |
| struct | mp3dec_frame_t |
| struct | mp3dec_index_t |
| struct | mp3dec_io_t |
| struct | mp3dec_ex_t |
Macros | |
| #define | MP3D_SEEK_TO_BYTE 0 /* mp3dec_ex_seek seeks to byte in stream */ |
| #define | MP3D_SEEK_TO_SAMPLE 1 /* mp3dec_ex_seek precisely seeks to sample using index (created during duration calculation scan or when mp3dec_ex_seek called) */ |
| #define | MP3D_DO_NOT_SCAN 2 /* do not scan whole stream for duration if vbrtag not found, mp3dec_ex_t::samples will be filled only if mp3dec_ex_t::vbr_tag_found == 1 */ |
| #define | MINIMP3_PREDECODE_FRAMES 2 /* frames to pre-decode and skip after seek (to fill internal structures) */ |
| #define | MINIMP3_IO_SIZE (128*1024) /* io buffer size for streaming functions, must be greater than MINIMP3_BUF_SIZE */ |
| #define | MINIMP3_BUF_SIZE (16*1024) /* buffer which can hold minimum 10 consecutive mp3 frames (~16KB) worst case */ |
| #define | MINIMP3_ENABLE_RING 0 /* WIP enable hardware magic ring buffer if available, to make less input buffer memmove(s) in callback IO mode */ |
| #define | MP3D_E_PARAM -1 |
| #define | MP3D_E_MEMORY -2 |
| #define | MP3D_E_IOERROR -3 |
| #define | MP3D_E_USER -4 /* can be used to stop processing from callbacks without indicating specific error */ |
| #define | MP3D_E_DECODE -5 /* decode error which can't be safely skipped, such as sample rate, layer and channels change */ |
| #define | MINIMP3_ID3_DETECT_SIZE 10 |
| #define | FRAMES_FLAG 1 |
| #define | BYTES_FLAG 2 |
| #define | TOC_FLAG 4 |
| #define | VBR_SCALE_FLAG 8 |
Typedefs | |
| typedef size_t(* | MP3D_READ_CB) (void *buf, size_t size, void *user_data) |
| typedef int(* | MP3D_SEEK_CB) (uint64_t position, void *user_data) |
| typedef int(* | MP3D_ITERATE_CB) (void *user_data, const uint8_t *frame, int frame_size, int free_format_bytes, size_t buf_size, uint64_t offset, mp3dec_frame_info_t *info) |
| typedef int(* | MP3D_PROGRESS_CB) (void *user_data, size_t file_size, uint64_t offset, mp3dec_frame_info_t *info) |
| #define BYTES_FLAG 2 |
| #define FRAMES_FLAG 1 |
| #define MINIMP3_BUF_SIZE (16*1024) /* buffer which can hold minimum 10 consecutive mp3 frames (~16KB) worst case */ |
| #define MINIMP3_ENABLE_RING 0 /* WIP enable hardware magic ring buffer if available, to make less input buffer memmove(s) in callback IO mode */ |
| #define MINIMP3_ID3_DETECT_SIZE 10 |
| #define MINIMP3_IO_SIZE (128*1024) /* io buffer size for streaming functions, must be greater than MINIMP3_BUF_SIZE */ |
| #define MINIMP3_PREDECODE_FRAMES 2 /* frames to pre-decode and skip after seek (to fill internal structures) */ |
| #define MP3D_DO_NOT_SCAN 2 /* do not scan whole stream for duration if vbrtag not found, mp3dec_ex_t::samples will be filled only if mp3dec_ex_t::vbr_tag_found == 1 */ |
| #define MP3D_E_DECODE -5 /* decode error which can't be safely skipped, such as sample rate, layer and channels change */ |
| #define MP3D_E_IOERROR -3 |
| #define MP3D_E_MEMORY -2 |
| #define MP3D_E_PARAM -1 |
| #define MP3D_E_USER -4 /* can be used to stop processing from callbacks without indicating specific error */ |
| #define MP3D_SEEK_TO_BYTE 0 /* mp3dec_ex_seek seeks to byte in stream */ |
| #define MP3D_SEEK_TO_SAMPLE 1 /* mp3dec_ex_seek precisely seeks to sample using index (created during duration calculation scan or when mp3dec_ex_seek called) */ |
| #define TOC_FLAG 4 |
| #define VBR_SCALE_FLAG 8 |
| typedef int(* MP3D_ITERATE_CB) (void *user_data, const uint8_t *frame, int frame_size, int free_format_bytes, size_t buf_size, uint64_t offset, mp3dec_frame_info_t *info) |
| typedef int(* MP3D_PROGRESS_CB) (void *user_data, size_t file_size, uint64_t offset, mp3dec_frame_info_t *info) |
|
static |
|
static |
| int mp3dec_detect_cb | ( | mp3dec_io_t * | io, |
| uint8_t * | buf, | ||
| size_t | buf_size ) |
|
static |
| void mp3dec_ex_close | ( | mp3dec_ex_t * | dec | ) |
| int mp3dec_ex_open | ( | mp3dec_ex_t * | dec, |
| const char * | file_name, | ||
| int | flags ) |
| int mp3dec_ex_open_buf | ( | mp3dec_ex_t * | dec, |
| const uint8_t * | buf, | ||
| size_t | buf_size, | ||
| int | flags ) |
| int mp3dec_ex_open_cb | ( | mp3dec_ex_t * | dec, |
| mp3dec_io_t * | io, | ||
| int | flags ) |
|
static |
| size_t mp3dec_ex_read | ( | mp3dec_ex_t * | dec, |
| mp3d_sample_t * | buf, | ||
| size_t | samples ) |
| int mp3dec_ex_seek | ( | mp3dec_ex_t * | dec, |
| uint64_t | position ) |
|
static |
| int mp3dec_iterate | ( | const char * | file_name, |
| MP3D_ITERATE_CB | callback, | ||
| void * | user_data ) |
| int mp3dec_iterate_buf | ( | const uint8_t * | buf, |
| size_t | buf_size, | ||
| MP3D_ITERATE_CB | callback, | ||
| void * | user_data ) |
| int mp3dec_iterate_cb | ( | mp3dec_io_t * | io, |
| uint8_t * | buf, | ||
| size_t | buf_size, | ||
| MP3D_ITERATE_CB | callback, | ||
| void * | user_data ) |
|
static |
| int mp3dec_load | ( | mp3dec_t * | dec, |
| const char * | file_name, | ||
| mp3dec_file_info_t * | info, | ||
| MP3D_PROGRESS_CB | progress_cb, | ||
| void * | user_data ) |
| int mp3dec_load_buf | ( | mp3dec_t * | dec, |
| const uint8_t * | buf, | ||
| size_t | buf_size, | ||
| mp3dec_file_info_t * | info, | ||
| MP3D_PROGRESS_CB | progress_cb, | ||
| void * | user_data ) |
| int mp3dec_load_cb | ( | mp3dec_t * | dec, |
| mp3dec_io_t * | io, | ||
| uint8_t * | buf, | ||
| size_t | buf_size, | ||
| mp3dec_file_info_t * | info, | ||
| MP3D_PROGRESS_CB | progress_cb, | ||
| void * | user_data ) |
|
static |
|
static |
|
static |