dependencies/SDL_sound/dr_mp3.h in gosu-2.0.0.pre7 vs dependencies/SDL_sound/dr_mp3.h in gosu-2.0.0.pre8
- old
+ new
@@ -1,8 +1,8 @@
/*
MP3 audio decoder. Choice of public domain or MIT-0. See license statements at the end of this file.
-dr_mp3 - v0.6.36 - 2023-06-17
+dr_mp3 - v0.6.38 - 2023-11-02
David Reid - mackron@gmail.com
GitHub: https://github.com/mackron/dr_libs
@@ -93,11 +93,11 @@
#define DRMP3_STRINGIFY(x) #x
#define DRMP3_XSTRINGIFY(x) DRMP3_STRINGIFY(x)
#define DRMP3_VERSION_MAJOR 0
#define DRMP3_VERSION_MINOR 6
-#define DRMP3_VERSION_REVISION 36
+#define DRMP3_VERSION_REVISION 38
#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. */
/* Sized Types */
@@ -711,11 +711,11 @@
#define DRMP3_HAVE_SIMD 0
#endif
-#if defined(__ARM_ARCH) && (__ARM_ARCH >= 6) && !defined(__aarch64__) && !defined(_M_ARM64)
+#if defined(__ARM_ARCH) && (__ARM_ARCH >= 6) && !defined(__aarch64__) && !defined(_M_ARM64) && !defined(__ARM_ARCH_6M__)
#define DRMP3_HAVE_ARMV6 1
static __inline__ __attribute__((always_inline)) drmp3_int32 drmp3_clip_int16_arm(drmp3_int32 a)
{
drmp3_int32 x = 0;
__asm__ ("ssat %0, #16, %1" : "=r"(x) : "r"(a));
@@ -2699,10 +2699,15 @@
}
DRMP3_ASSERT(pMP3->pData != NULL);
DRMP3_ASSERT(pMP3->dataCapacity > 0);
+ /* Do a runtime check here to try silencing a false-positive from clang-analyzer. */
+ if (pMP3->pData == NULL) {
+ return 0;
+ }
+
pcmFramesRead = drmp3dec_decode_frame(&pMP3->decoder, pMP3->pData + pMP3->dataConsumed, (int)pMP3->dataSize, pPCMFrames, &info); /* <-- Safe size_t -> int conversion thanks to the check above. */
/* Consume the data. */
if (info.frame_bytes > 0) {
pMP3->dataConsumed += (size_t)info.frame_bytes;
@@ -4488,9 +4493,15 @@
*/
/*
REVISION HISTORY
================
+v0.6.38 - 2023-11-02
+ - Fix build for ARMv6-M.
+
+v0.6.37 - 2023-07-07
+ - Silence a static analysis warning.
+
v0.6.36 - 2023-06-17
- Fix an incorrect date in revision history. No functional change.
v0.6.35 - 2023-05-22
- Minor code restructure. No functional change.