Commit 7a745d1d authored by David Reid's avatar David Reid

Update dr_flac.

parent 158b0f28
/* /*
FLAC audio decoder. Choice of public domain or MIT-0. See license statements at the end of this file. FLAC audio decoder. Choice of public domain or MIT-0. See license statements at the end of this file.
dr_flac - v0.11.8 - 2019-05-21 dr_flac - v0.11.9 - 2019-06-16
David Reid - mackron@gmail.com David Reid - mackron@gmail.com
*/ */
...@@ -149,7 +149,7 @@ typedef drflac_uint32 drflac_bool32; ...@@ -149,7 +149,7 @@ typedef drflac_uint32 drflac_bool32;
#elif (defined(__GNUC__) && __GNUC__ >= 4) /* GCC 4 */ #elif (defined(__GNUC__) && __GNUC__ >= 4) /* GCC 4 */
#define DRFLAC_DEPRECATED __attribute__((deprecated)) #define DRFLAC_DEPRECATED __attribute__((deprecated))
#elif defined(__has_feature) /* Clang */ #elif defined(__has_feature) /* Clang */
#if defined(__has_feature(attribute_deprecated)) #if __has_feature(attribute_deprecated)
#define DRFLAC_DEPRECATED __attribute__((deprecated)) #define DRFLAC_DEPRECATED __attribute__((deprecated))
#else #else
#define DRFLAC_DEPRECATED #define DRFLAC_DEPRECATED
...@@ -1141,9 +1141,24 @@ reference excess prior samples. ...@@ -1141,9 +1141,24 @@ reference excess prior samples.
/* CPU caps. */ /* CPU caps. */
static drflac_bool32 drflac__gIsLZCNTSupported = DRFLAC_FALSE; static drflac_bool32 drflac__gIsLZCNTSupported = DRFLAC_FALSE;
#ifndef DRFLAC_NO_CPUID #ifndef DRFLAC_NO_CPUID
/*
I've had a bug report that Clang's ThreadSanitizer presents a warning in this function. Having reviewed this, this does
actually make sense. However, since CPU caps should never differ for a running process, I don't think the trade off of
complicating internal API's by passing around CPU caps versus just disabling the warnings is worthwhile. I'm therefore
just going to disable these warnings.
*/
#if defined(__has_feature)
#if __has_feature(thread_sanitizer)
#define DRFLAC_NO_THREAD_SANITIZE __attribute__((no_sanitize("thread")))
#else
#define DRFLAC_NO_THREAD_SANITIZE
#endif
#else
#define DRFLAC_NO_THREAD_SANITIZE
#endif
static drflac_bool32 drflac__gIsSSE2Supported = DRFLAC_FALSE; static drflac_bool32 drflac__gIsSSE2Supported = DRFLAC_FALSE;
static drflac_bool32 drflac__gIsSSE41Supported = DRFLAC_FALSE; static drflac_bool32 drflac__gIsSSE41Supported = DRFLAC_FALSE;
static void drflac__init_cpu_caps() DRFLAC_NO_THREAD_SANITIZE static void drflac__init_cpu_caps()
{ {
static drflac_bool32 isCPUCapsInitialized = DRFLAC_FALSE; static drflac_bool32 isCPUCapsInitialized = DRFLAC_FALSE;
...@@ -8656,6 +8671,9 @@ drflac_bool32 drflac_next_cuesheet_track(drflac_cuesheet_track_iterator* pIter, ...@@ -8656,6 +8671,9 @@ drflac_bool32 drflac_next_cuesheet_track(drflac_cuesheet_track_iterator* pIter,
/* /*
REVISION HISTORY REVISION HISTORY
================ ================
v0.11.9 - 2019-06-16
- Silence some ThreadSanitizer warnings.
v0.11.8 - 2019-05-21 v0.11.8 - 2019-05-21
- Fix warnings. - Fix warnings.
......
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