mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 08:14:04 +02:00
Update dr_flac and dr_mp3.
This commit is contained in:
+19
-6
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
FLAC audio decoder. Choice of public domain or MIT-0. See license statements at the end of this file.
|
||||
dr_flac - v0.12.24 - 2020-11-29
|
||||
dr_flac - v0.12.25 - 2020-12-26
|
||||
|
||||
David Reid - mackron@gmail.com
|
||||
|
||||
@@ -166,7 +166,7 @@ If you just want to quickly decode an entire FLAC file in one go you can do some
|
||||
|
||||
...
|
||||
|
||||
drflac_free(pSampleData);
|
||||
drflac_free(pSampleData, NULL);
|
||||
```
|
||||
|
||||
You can read samples as signed 16-bit integer and 32-bit floating-point PCM with the *_s16() and *_f32() family of APIs respectively, but note that these
|
||||
@@ -232,7 +232,7 @@ extern "C" {
|
||||
|
||||
#define DRFLAC_VERSION_MAJOR 0
|
||||
#define DRFLAC_VERSION_MINOR 12
|
||||
#define DRFLAC_VERSION_REVISION 24
|
||||
#define DRFLAC_VERSION_REVISION 25
|
||||
#define DRFLAC_VERSION_STRING DRFLAC_XSTRINGIFY(DRFLAC_VERSION_MAJOR) "." DRFLAC_XSTRINGIFY(DRFLAC_VERSION_MINOR) "." DRFLAC_XSTRINGIFY(DRFLAC_VERSION_REVISION)
|
||||
|
||||
#include <stddef.h> /* For size_t. */
|
||||
@@ -408,7 +408,10 @@ typedef struct
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* The metadata type. Use this to know how to interpret the data below. */
|
||||
/*
|
||||
The metadata type. Use this to know how to interpret the data below. Will be set to one of the
|
||||
DRFLAC_METADATA_BLOCK_TYPE_* tokens.
|
||||
*/
|
||||
drflac_uint32 type;
|
||||
|
||||
/*
|
||||
@@ -552,7 +555,8 @@ pMetadata (in)
|
||||
|
||||
Remarks
|
||||
-------
|
||||
Use pMetadata->type to determine which metadata block is being handled and how to read the data.
|
||||
Use pMetadata->type to determine which metadata block is being handled and how to read the data. This
|
||||
will be set to one of the DRFLAC_METADATA_BLOCK_TYPE_* tokens.
|
||||
*/
|
||||
typedef void (* drflac_meta_proc)(void* pUserData, drflac_metadata* pMetadata);
|
||||
|
||||
@@ -797,6 +801,8 @@ from a block of memory respectively.
|
||||
|
||||
The STREAMINFO block must be present for this to succeed. Use `drflac_open_relaxed()` to open a FLAC stream where the header may not be present.
|
||||
|
||||
Use `drflac_open_with_metadata()` if you need access to metadata.
|
||||
|
||||
|
||||
Seek Also
|
||||
---------
|
||||
@@ -843,6 +849,8 @@ as that is for internal use only.
|
||||
|
||||
Opening in relaxed mode will continue reading data from onRead until it finds a valid frame. If a frame is never found it will continue forever. To abort,
|
||||
force your `onRead` callback to return 0, which dr_flac will use as an indicator that the end of the stream was found.
|
||||
|
||||
Use `drflac_open_with_metadata_relaxed()` if you need access to metadata.
|
||||
*/
|
||||
DRFLAC_API drflac* drflac_open_relaxed(drflac_read_proc onRead, drflac_seek_proc onSeek, drflac_container container, void* pUserData, const drflac_allocation_callbacks* pAllocationCallbacks);
|
||||
|
||||
@@ -882,7 +890,9 @@ Close the decoder with `drflac_close()`.
|
||||
This is slower than `drflac_open()`, so avoid this one if you don't need metadata. Internally, this will allocate and free memory on the heap for every
|
||||
metadata block except for STREAMINFO and PADDING blocks.
|
||||
|
||||
The caller is notified of the metadata via the `onMeta` callback. All metadata blocks will be handled before the function returns.
|
||||
The caller is notified of the metadata via the `onMeta` callback. All metadata blocks will be handled before the function returns. This callback takes a
|
||||
pointer to a `drflac_metadata` object which is a union containing the data of all relevant metadata blocks. Use the `type` member to discriminate against
|
||||
the different metadata types.
|
||||
|
||||
The STREAMINFO block must be present for this to succeed. Use `drflac_open_with_metadata_relaxed()` to open a FLAC stream where the header may not be present.
|
||||
|
||||
@@ -11792,6 +11802,9 @@ DRFLAC_API drflac_bool32 drflac_next_cuesheet_track(drflac_cuesheet_track_iterat
|
||||
/*
|
||||
REVISION HISTORY
|
||||
================
|
||||
v0.12.25 - 2020-12-26
|
||||
- Update documentation.
|
||||
|
||||
v0.12.24 - 2020-11-29
|
||||
- Fix ARM64/NEON detection when compiling with MSVC.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user