Update external libraries.

This commit is contained in:
David Reid
2020-05-16 09:20:00 +10:00
parent 6d574e25b2
commit 7221bc4a62
3 changed files with 128 additions and 4 deletions
+43 -2
View File
@@ -1,6 +1,6 @@
/*
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.3 - 2020-04-30
dr_wav - v0.12.4 - 2020-05-16
David Reid - mackron@gmail.com
@@ -139,6 +139,14 @@ Notes
extern "C" {
#endif
#define DRWAV_STRINGIFY(x) #x
#define DRWAV_XSTRINGIFY(x) DRWAV_STRINGIFY(x)
#define DRWAV_VERSION_MAJOR 0
#define DRWAV_VERSION_MINOR 12
#define DRWAV_VERSION_REVISION 4
#define DRWAV_VERSION_STRING DRWAV_XSTRINGIFY(DRWAV_VERSION_MAJOR) "." DRWAV_XSTRINGIFY(DRWAV_VERSION_MINOR) "." DRWAV_XSTRINGIFY(DRWAV_VERSION_REVISION)
#include <stddef.h> /* For size_t. */
/* Sized types. Prefer built-in types. Fall back to stdint. */
@@ -279,6 +287,9 @@ typedef drwav_int32 drwav_result;
/* Flags to pass into drwav_init_ex(), etc. */
#define DRWAV_SEQUENTIAL 0x00000001
DRWAV_API void drwav_version(drwav_uint32* pMajor, drwav_uint32* pMinor, drwav_uint32* pRevision);
DRWAV_API const char* drwav_version_string();
typedef enum
{
drwav_seek_origin_start,
@@ -1037,6 +1048,26 @@ DRWAV_API drwav_bool32 drwav_fourcc_equal(const drwav_uint8* a, const char* b);
#endif
#endif
DRWAV_API void drwav_version(drwav_uint32* pMajor, drwav_uint32* pMinor, drwav_uint32* pRevision)
{
if (pMajor) {
*pMajor = DRWAV_VERSION_MAJOR;
}
if (pMinor) {
*pMinor = DRWAV_VERSION_MINOR;
}
if (pRevision) {
*pRevision = DRWAV_VERSION_REVISION;
}
}
DRWAV_API const char* drwav_version_string()
{
return DRWAV_VERSION_STRING;
}
/*
These limits are used for basic validation when initializing the decoder. If you exceed these limits, first of all: what on Earth are
you doing?! (Let me know, I'd be curious!) Second, you can adjust these by #define-ing them before the dr_wav implementation.
@@ -3469,7 +3500,7 @@ DRWAV_API drwav_bool32 drwav_seek_to_pcm_frame(drwav* pWav, drwav_uint64 targetF
} else if (pWav->translatedFormatTag == DR_WAVE_FORMAT_DVI_ADPCM) {
framesRead = drwav_read_pcm_frames_s16__ima(pWav, framesToRead, devnull);
} else {
assert(DRWAV_FALSE); /* If this assertion is triggered it means I've implemented a new compressed format but forgot to add a branch for it here. */
DRWAV_ASSERT(DRWAV_FALSE); /* If this assertion is triggered it means I've implemented a new compressed format but forgot to add a branch for it here. */
}
if (framesRead != framesToRead) {
@@ -5753,6 +5784,16 @@ two different ways to initialize a drwav object.
/*
REVISION HISTORY
================
v0.12.4 - 2020-05-16
- Replace assert() with DRWAV_ASSERT().
- Add compile-time and run-time version querying.
- DRWAV_VERSION_MINOR
- DRWAV_VERSION_MAJOR
- DRWAV_VERSION_REVISION
- DRWAV_VERSION_STRING
- drwav_version()
- drwav_version_string()
v0.12.3 - 2020-04-30
- Fix compilation errors with VC6.