* Replace _declspec with __declspec.
* Replace __wgetmainargs_ with __wgetmainargs_t and __wgetmainargs
with wgetmainargs because identifiers with leading underscores are
reserved for the compiler.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
The old code was creating an array of FLAC__int8, and then casting
that to a set of signed and unsigned 16 and 32 bit integers. This
was replaced with a single union containing all the requred array.
This solution means that there are fewer pointer casts and actually
gives the compiler more information with which to generate fast code.
This reverts commit 151739921b74fbf31420358a5fbeb094efa017ed.
This patch only when part way to replace all FLAC_* with FLaC_*
and its really not worth going all the way.
Old code was for the Intel compiler, had no appreciable performance benefits
and doesn't actually work with current version of that compiler.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
When decoding, read the contents of the WAVEFORMATEXTENSIBLE_CHANNEL_MASK
tag and write write the channel mask to the WAV file.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
These were most arising from -Wenum-conversion where an enum of
one type was being assigned to a variable on another.
Originally reported by Lenny Maiorani <lenny@colorado.edu> on the
flac-dev mailing list.
Includes:
* Replace 'CALLBACK' with 'WINAPI' because the signature of an unhandled
exception filter uses 'WINAPI'.
* Improvements to OS SSE testing code.
* Improvements to GCC asm code.
* Comment fixes.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
Previously if a zero length string was passed in, the pointer would be
stored regardless of the copy parameter. If the original source pointer
was reassigned to something else bad things could happen.
Closes: https://sourceforge.net/p/flac/bugs/377/
This reverts commit 70b078cfd5f9d4b0692c33f018cac3c652b14f90.
The code in the patch we're reverting probably only works for one
compiler and could easily stop working with the next release of
that compiler.
The x86 FPU holds intermediate results in larger registers than what
the SSE unit uses, resulting in slighlty different encodings of audio
data. Attempt to fix this by modifying libFLAC/lpc.c to store calculation
results in a FLAC__read before adding it to a sum.
At the moment this works, but I could easily imagine a new version of
the compiler optimising this store to the FLAC__real away leaving us
in the same situation we have now.
Patch-from: Oliver Stöneberg on sourceforge.net
Closes: https://sourceforge.net/p/flac/bugs/409/