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
@@ -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.
@@ -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.