[flac-dev] PATCH for MSVC: libFLAC and FLAC__ALIGN_MALLOC_DATA
Somehow MSVC projects don't have FLAC__ALIGN_MALLOC_DATA defined. --- a\src\libFLAC\libFLAC_static.vcproj 2013-08-13 13:30:24.0 +0400 +++ b\src\libFLAC\libFLAC_static.vcproj 2013-08-15 21:55:18.343822400 +0400 @@ -40,7 +40,7 @@ Name=VCCLCompilerTool Optimization=0 AdditionalIncludeDirectories=.\include;..\..\include - PreprocessorDefinitions=WIN32;_DEBUG;_LIB;FLAC__HAS_OGG;FLAC__CPU_IA32;FLAC__HAS_NASM;FLAC__USE_3DNOW;VERSION=\quot;1.3.0\quot;;FLAC__NO_DLL;DEBUG;FLAC__OVERFLOW_DETECT + PreprocessorDefinitions=WIN32;_DEBUG;_LIB;FLAC__HAS_OGG;FLAC__CPU_IA32;FLAC__HAS_NASM;FLAC__USE_3DNOW;FLAC__ALIGN_MALLOC_DATA;VERSION=\quot;1.3.0\quot;;FLAC__NO_DLL;DEBUG;FLAC__OVERFLOW_DETECT MinimalRebuild=true BasicRuntimeChecks=3 RuntimeLibrary=1 @@ -108,7 +108,7 @@ OmitFramePointers=true WholeProgramOptimization=true AdditionalIncludeDirectories=.\include;..\..\include - PreprocessorDefinitions=WIN32;NDEBUG;_LIB;FLAC__HAS_OGG;FLAC__CPU_IA32;FLAC__HAS_NASM;FLAC__USE_3DNOW;VERSION=\quot;1.3.0\quot;;FLAC__NO_DLL;FLaC__INLINE=_inline + PreprocessorDefinitions=WIN32;NDEBUG;_LIB;FLAC__HAS_OGG;FLAC__CPU_IA32;FLAC__HAS_NASM;FLAC__USE_3DNOW;FLAC__ALIGN_MALLOC_DATA;VERSION=\quot;1.3.0\quot;;FLAC__NO_DLL;FLaC__INLINE=_inline RuntimeLibrary=0 BufferSecurityCheck=false UsePrecompiledHeader=0 --- a\src\libFLAC\libFLAC_dynamic.vcproj2013-08-13 13:30:24.0 +0400 +++ b\src\libFLAC\libFLAC_dynamic.vcproj2013-08-15 21:54:54.005430300 +0400 @@ -40,7 +40,7 @@ Name=VCCLCompilerTool Optimization=0 AdditionalIncludeDirectories=.\include;..\..\include - PreprocessorDefinitions=WIN32;_DEBUG;_WINDOWS;_USRDLL;FLAC_API_EXPORTS;FLAC__HAS_OGG;FLAC__CPU_IA32;FLAC__HAS_NASM;FLAC__USE_3DNOW;VERSION=\quot;1.3.0\quot;;DEBUG;FLAC__OVERFLOW_DETECT + PreprocessorDefinitions=WIN32;_DEBUG;_WINDOWS;_USRDLL;FLAC_API_EXPORTS;FLAC__HAS_OGG;FLAC__CPU_IA32;FLAC__HAS_NASM;FLAC__USE_3DNOW;FLAC__ALIGN_MALLOC_DATA;VERSION=\quot;1.3.0\quot;;DEBUG;FLAC__OVERFLOW_DETECT MinimalRebuild=true BasicRuntimeChecks=3 RuntimeLibrary=1 @@ -119,7 +119,7 @@ OmitFramePointers=true WholeProgramOptimization=true AdditionalIncludeDirectories=.\include;..\..\include - PreprocessorDefinitions=WIN32;NDEBUG;_WINDOWS;_USRDLL;FLAC_API_EXPORTS;FLAC__HAS_OGG;FLAC__CPU_IA32;FLAC__HAS_NASM;FLAC__USE_3DNOW;VERSION=\quot;1.3.0\quot;;FLaC__INLINE=_inline + PreprocessorDefinitions=WIN32;NDEBUG;_WINDOWS;_USRDLL;FLAC_API_EXPORTS;FLAC__HAS_OGG;FLAC__CPU_IA32;FLAC__HAS_NASM;FLAC__USE_3DNOW;FLAC__ALIGN_MALLOC_DATA;VERSION=\quot;1.3.0\quot;;FLaC__INLINE=_inline RuntimeLibrary=0 BufferSecurityCheck=false UsePrecompiledHeader=0 ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
[flac-dev] PATCH: MSVC and M_LN2
math.h file in MS VC++ _does_ have M_LN2 constant but it requires _USE_MATH_DEFINES: --- a\src\libFLAC\fixed.c 2013-08-13 13:30:24.0 +0400 +++ b\src\libFLAC\fixed.c 2013-08-14 10:14:07.873648300 +0400 @@ -34,6 +34,9 @@ # include config.h #endif +#if defined(_MSC_VER) +#define _USE_MATH_DEFINES +#endif #include math.h #include string.h #include private/bitmath.h @@ -42,7 +45,6 @@ #include FLAC/assert.h #ifndef M_LN2 -/* math.h in VC++ doesn't seem to have this (how Microsoft is that?) */ #define M_LN2 0.69314718055994530942 #endif --- a\src\libFLAC\lpc.c 2013-08-13 13:30:24.0 +0400 +++ b\src\libFLAC\lpc.c 2013-08-06 19:17:00.765482100 +0400 @@ -34,6 +34,9 @@ # include config.h #endif +#if defined(_MSC_VER) +#define _USE_MATH_DEFINES +#endif #include math.h #include FLAC/assert.h @@ -52,7 +55,6 @@ #ifndef FLAC__INTEGER_ONLY_LIBRARY #ifndef M_LN2 -/* math.h in VC++ doesn't seem to have this (how Microsoft is that?) */ #define M_LN2 0.69314718055994530942 #endif ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
[flac-dev] PATCH for bitmath.h: 1 typo, 1 warning
rutine - routine Also MSVC complains that FLAC__uint32* (unsigned int*) is not of the same type as unsigned long* --- a\src\libFLAC\include\private\bitmath.h 2013-08-13 13:30:24.0 +0400 +++ b\src\libFLAC\include\private\bitmath.h 2013-08-14 10:20:51.484053700 +0400 @@ -78,12 +78,12 @@ return _bit_scan_reverse(v) ^ 31U; #elif defined(__GNUC__) (__GNUC__ = 4 || (__GNUC__ == 3 __GNUC_MINOR__ = 4)) /* This will translate either to (bsr ^ 31U), clz , ctlz, cntlz, lzcnt depending on - * -march= setting or to a software rutine in exotic machines. */ + * -march= setting or to a software routine in exotic machines. */ return __builtin_clz(v); #elif defined(_MSC_VER) (_MSC_VER = 1400) -FLAC__uint32 idx; +unsigned long idx; _BitScanReverse(idx, v); -return idx ^ 31U; +return (unsigned)idx ^ 31U; #else return FLAC__clz_soft_uint32(v); #endif ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
[flac-dev] About the usefulness of fast_float_math_hack.h
fast_float_math_hack.h works only when __ICL is defined (that is, when FLAC is compiled with Intel compiler). But current Intel compilers don't have mathf.h file. Instead, mathimf.h should be used, and mathimf.h is not compatible with the standard math.h. Maybe it's time to remove fast_float_math_hack.h? It is useful only for those who use ICC compiled FLAC and use --apply-replaygain-which-is-not-lossless switch with hard -6dB limiting. ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev