mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
Update dr_libs.
This commit is contained in:
+28
-8
@@ -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.20 - 2020-09-08
|
||||
dr_flac - v0.12.21 - 2020-11-01
|
||||
|
||||
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 20
|
||||
#define DRFLAC_VERSION_REVISION 21
|
||||
#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. */
|
||||
@@ -248,7 +248,7 @@ typedef unsigned int drflac_uint32;
|
||||
typedef signed __int64 drflac_int64;
|
||||
typedef unsigned __int64 drflac_uint64;
|
||||
#else
|
||||
#if defined(__GNUC__)
|
||||
#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wlong-long"
|
||||
#if defined(__clang__)
|
||||
@@ -257,7 +257,7 @@ typedef unsigned int drflac_uint32;
|
||||
#endif
|
||||
typedef signed long long drflac_int64;
|
||||
typedef unsigned long long drflac_uint64;
|
||||
#if defined(__GNUC__)
|
||||
#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
#endif
|
||||
@@ -1319,7 +1319,7 @@ DRFLAC_API drflac_bool32 drflac_next_cuesheet_track(drflac_cuesheet_track_iterat
|
||||
#define dr_flac_c
|
||||
|
||||
/* Disable some annoying warnings. */
|
||||
#if defined(__GNUC__)
|
||||
#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))
|
||||
#pragma GCC diagnostic push
|
||||
#if __GNUC__ >= 7
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
|
||||
@@ -1367,7 +1367,15 @@ DRFLAC_API drflac_bool32 drflac_next_cuesheet_track(drflac_cuesheet_track_iterat
|
||||
#define DRFLAC_ARM
|
||||
#endif
|
||||
|
||||
/* Intrinsics Support */
|
||||
/*
|
||||
Intrinsics Support
|
||||
|
||||
There's a bug in GCC 4.2.x which results in an incorrect compilation error when using _mm_slli_epi32() where it complains with
|
||||
|
||||
"error: shift must be an immediate"
|
||||
|
||||
Unfortuantely dr_flac depends on this for a few things so we're just going to disable SSE on GCC 4.2 and below.
|
||||
*/
|
||||
#if !defined(DR_FLAC_NO_SIMD)
|
||||
#if defined(DRFLAC_X64) || defined(DRFLAC_X86)
|
||||
#if defined(_MSC_VER) && !defined(__clang__)
|
||||
@@ -1378,7 +1386,7 @@ DRFLAC_API drflac_bool32 drflac_next_cuesheet_track(drflac_cuesheet_track_iterat
|
||||
#if _MSC_VER >= 1600 && !defined(DRFLAC_NO_SSE41) /* 2010 */
|
||||
#define DRFLAC_SUPPORT_SSE41
|
||||
#endif
|
||||
#else
|
||||
#elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC__ >= 3)))
|
||||
/* Assume GNUC-style. */
|
||||
#if defined(__SSE2__) && !defined(DRFLAC_NO_SSE2)
|
||||
#define DRFLAC_SUPPORT_SSE2
|
||||
@@ -5741,6 +5749,9 @@ static drflac_bool32 drflac__seek_to_approximate_flac_frame_to_byte(drflac* pFla
|
||||
*pLastSuccessfulSeekOffset = pFlac->firstFLACFramePosInBytes;
|
||||
|
||||
for (;;) {
|
||||
/* After rangeLo == rangeHi == targetByte fails, we need to break out. */
|
||||
drflac_uint64 lastTargetByte = targetByte;
|
||||
|
||||
/* When seeking to a byte, failure probably means we've attempted to seek beyond the end of the stream. To counter this we just halve it each attempt. */
|
||||
if (!drflac__seek_to_byte(&pFlac->bs, targetByte)) {
|
||||
/* If we couldn't even seek to the first byte in the stream we have a problem. Just abandon the whole thing. */
|
||||
@@ -5781,6 +5792,11 @@ static drflac_bool32 drflac__seek_to_approximate_flac_frame_to_byte(drflac* pFla
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* We already tried this byte and there are no more to try, break out. */
|
||||
if(targetByte == lastTargetByte) {
|
||||
return DRFLAC_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/* The current PCM frame needs to be updated based on the frame we just seeked to. */
|
||||
@@ -11763,7 +11779,7 @@ DRFLAC_API drflac_bool32 drflac_next_cuesheet_track(drflac_cuesheet_track_iterat
|
||||
return DRFLAC_TRUE;
|
||||
}
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
#endif /* dr_flac_c */
|
||||
@@ -11773,6 +11789,10 @@ DRFLAC_API drflac_bool32 drflac_next_cuesheet_track(drflac_cuesheet_track_iterat
|
||||
/*
|
||||
REVISION HISTORY
|
||||
================
|
||||
v0.12.21 - 2020-11-01
|
||||
- Fix a possible deadlock when seeking.
|
||||
- Improve compiler support for older versions of GCC.
|
||||
|
||||
v0.12.20 - 2020-09-08
|
||||
- Fix a compilation error on older compilers.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user