Commit 825ab5d6 authored by David Reid's avatar David Reid

Update dr_flac, dr_wav and dr_mp3.

parent 0590fb07
/*
FLAC audio decoder. Choice of public domain or MIT-0. See license statements at the end of this file.
dr_flac - v0.12.13 - 2020-05-16
dr_flac - v0.12.14 - 2020-06-23
David Reid - mackron@gmail.com
......@@ -232,7 +232,7 @@ extern "C" {
#define DRFLAC_VERSION_MAJOR 0
#define DRFLAC_VERSION_MINOR 12
#define DRFLAC_VERSION_REVISION 13
#define DRFLAC_VERSION_REVISION 14
#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. */
......@@ -1316,6 +1316,8 @@ DRFLAC_API drflac_bool32 drflac_next_cuesheet_track(drflac_cuesheet_track_iterat
************************************************************************************************************************************************************
************************************************************************************************************************************************************/
#if defined(DR_FLAC_IMPLEMENTATION) || defined(DRFLAC_IMPLEMENTATION)
#ifndef dr_flac_c
#define dr_flac_c
/* Disable some annoying warnings. */
#if defined(__GNUC__)
......@@ -11731,12 +11733,16 @@ DRFLAC_API drflac_bool32 drflac_next_cuesheet_track(drflac_cuesheet_track_iterat
#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif
#endif /* dr_flac_c */
#endif /* DR_FLAC_IMPLEMENTATION */
/*
REVISION HISTORY
================
v0.12.14 - 2020-06-23
- Add include guard for the implementation section.
v0.12.13 - 2020-05-16
- Add compile-time and run-time version querying.
- DRFLAC_VERSION_MINOR
......
/*
MP3 audio decoder. Choice of public domain or MIT-0. See license statements at the end of this file.
dr_mp3 - v0.6.11 - 2020-05-26
dr_mp3 - v0.6.12 - 2020-06-23
David Reid - mackron@gmail.com
......@@ -95,7 +95,7 @@ extern "C" {
#define DRMP3_VERSION_MAJOR 0
#define DRMP3_VERSION_MINOR 6
#define DRMP3_VERSION_REVISION 11
#define DRMP3_VERSION_REVISION 12
#define DRMP3_VERSION_STRING DRMP3_XSTRINGIFY(DRMP3_VERSION_MAJOR) "." DRMP3_XSTRINGIFY(DRMP3_VERSION_MINOR) "." DRMP3_XSTRINGIFY(DRMP3_VERSION_REVISION)
#include <stddef.h> /* For size_t. */
......@@ -523,6 +523,9 @@ DRMP3_API void drmp3_free(void* p, const drmp3_allocation_callbacks* pAllocation
************************************************************************************************************************************************************
************************************************************************************************************************************************************/
#if defined(DR_MP3_IMPLEMENTATION) || defined(DRMP3_IMPLEMENTATION)
#ifndef dr_mp3_c
#define dr_mp3_c
#include <stdlib.h>
#include <string.h>
#include <limits.h> /* For INT_MAX */
......@@ -4339,6 +4342,7 @@ DRMP3_API void drmp3_free(void* p, const drmp3_allocation_callbacks* pAllocation
}
}
#endif /* dr_mp3_c */
#endif /*DR_MP3_IMPLEMENTATION*/
/*
......@@ -4424,6 +4428,9 @@ counts rather than sample counts.
/*
REVISION HISTORY
================
v0.6.12 - 2020-06-23
- Add include guard for the implementation section.
v0.6.11 - 2020-05-26
- Fix use of uninitialized variable error.
......
/*
WAV audio loader and writer. Choice of public domain or MIT-0. See license statements at the end of this file.
dr_wav - v0.12.6 - TBD
dr_wav - v0.12.6 - 2020-06-23
David Reid - mackron@gmail.com
......@@ -953,6 +953,9 @@ DRWAV_API drwav_bool32 drwav_fourcc_equal(const drwav_uint8* a, const char* b);
************************************************************************************************************************************************************
************************************************************************************************************************************************************/
#if defined(DR_WAV_IMPLEMENTATION) || defined(DRWAV_IMPLEMENTATION)
#ifndef dr_wav_c
#define dr_wav_c
#include <stdlib.h>
#include <string.h> /* For memcpy(), memset() */
#include <limits.h> /* For INT_MAX */
......@@ -3960,6 +3963,7 @@ static drwav_uint64 drwav_read_pcm_frames_s16__ima(drwav* pWav, drwav_uint64 fra
pWav->ima.stepIndex[0] = header[2];
pWav->ima.predictor[1] = drwav__bytes_to_s16(header + 4);
pWav->ima.stepIndex[1] = header[6];
pWav->ima.cachedFrames[drwav_countof(pWav->ima.cachedFrames) - 2] = pWav->ima.predictor[0];
pWav->ima.cachedFrames[drwav_countof(pWav->ima.cachedFrames) - 1] = pWav->ima.predictor[1];
pWav->ima.cachedFrameCount = 1;
......@@ -5680,6 +5684,7 @@ DRWAV_API drwav_bool32 drwav_fourcc_equal(const drwav_uint8* a, const char* b)
return drwav__fourcc_equal(a, b);
}
#endif /* dr_wav_c */
#endif /* DR_WAV_IMPLEMENTATION */
/*
......@@ -5870,8 +5875,10 @@ two different ways to initialize a drwav object.
/*
REVISION HISTORY
================
v0.12.6 - TBD
v0.12.6 - 2020-06-23
- Change drwav_read_*() to allow NULL to be passed in as the output buffer which is equivalent to a forward seek.
- Fix a buffer overflow when trying to decode invalid IMA-ADPCM files.
- Add include guard for the implementation section.
v0.12.5 - 2020-05-27
- Minor documentation fix.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment