From 16c90329f3a9f84c4e8859d08f78541fe7b57c0f Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Tue, 26 Apr 2022 12:39:35 -0700 Subject: [PATCH] SoundTouch: remove common types from global namespace --- Externals/soundtouch/STTypes.h | 29 ++++++++++++++--------------- Externals/soundtouch/cpu_detect.h | 2 ++ 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/Externals/soundtouch/STTypes.h b/Externals/soundtouch/STTypes.h index a07bc3dcea..375a0a3789 100644 --- a/Externals/soundtouch/STTypes.h +++ b/Externals/soundtouch/STTypes.h @@ -39,21 +39,6 @@ #ifndef STTypes_H #define STTypes_H -typedef unsigned int uint; -typedef unsigned long ulong; - -// Patch for MinGW: on Win64 long is 32-bit -#ifdef _WIN64 - typedef unsigned long long ulongptr; -#else - typedef ulong ulongptr; -#endif - - -// Helper macro for aligning pointer up to next 16-byte boundary -#define SOUNDTOUCH_ALIGN_POINTER_16(x) ( ( (ulongptr)(x) + 15 ) & ~(ulongptr)15 ) - - #if (defined(__GNUC__) && !defined(ANDROID)) // In GCC, include soundtouch_config.h made by config scritps. // Skip this in Android compilation that uses GCC but without configure scripts. @@ -63,6 +48,20 @@ typedef unsigned long ulong; namespace soundtouch { + typedef unsigned int uint; + typedef unsigned long ulong; + + // Patch for MinGW: on Win64 long is 32-bit + #ifdef _WIN64 + typedef unsigned long long ulongptr; + #else + typedef ulong ulongptr; + #endif + + + // Helper macro for aligning pointer up to next 16-byte boundary + #define SOUNDTOUCH_ALIGN_POINTER_16(x) ( ( (ulongptr)(x) + 15 ) & ~(ulongptr)15 ) + /// Activate these undef's to overrule the possible sampletype /// setting inherited from some other header file: #undef SOUNDTOUCH_INTEGER_SAMPLES diff --git a/Externals/soundtouch/cpu_detect.h b/Externals/soundtouch/cpu_detect.h index 025781dae1..79d5127204 100644 --- a/Externals/soundtouch/cpu_detect.h +++ b/Externals/soundtouch/cpu_detect.h @@ -51,6 +51,8 @@ #define SUPPORT_SSE 0x0008 #define SUPPORT_SSE2 0x0010 +using namespace soundtouch; + /// Checks which instruction set extensions are supported by the CPU. /// /// \return A bitmask of supported extensions, see SUPPORT_... defines.