Define function flac_snprintf() which has ISO C99 snprintf() behavior
even when compiling with Microsoft Visual Studio, by wrapping the
MSVS snprintf_s() function.
The files src/flac/encode.c and src/libFLAC/stream_encoder.c use
functions in libFLAC that are marked as 'unpublished debug routines'.
This patch moves these functions to new file include/share/private.h
and marks them as 'unpublished debug routines'.
The autoreconf tool is provided by autoconf to do what custom
autogen.sh scripts in many projects used to do. Only it is more
robust and widely tested. It has been available for several years,
too. No reason to rely on custom code for this.
Signed-off-by: Max Horn <max@quendi.de>
With gcc >= 4 and ELF, set default visibility to hidden and make visible
only the symbols with FLAC_API or FLACPP_API.
A convenience libFLAC-static.la is created for test_libFLAC as it
depends on the hidden symbols.
The problem was that the function safe_malloc_mul_2op_() was originally
defined as static inline in inclide/share/alloc.h but had to be moved
because GCC was refusing to inline it. Once moved however, static linking
would fail when building the flac executable because the function ended
up beiong linked twice.
- INCLUDES is deprecated, and CPPFLAGS is an user-defined
variable, use the proper AM_CPPFLAGS instead
- Remove FLAC__INLINE definition, providing proper
replacement for MSVC compilers.
- Detect if we have C99 's lround and provide a replacement
for windows...
This implementation uses decimation to generate an estimate of the
required ReplayGain adjustment for tracks sampled at high rates.
This approach avoids having to generate filters with commensurately more taps,
and also the subsequent effect on performance as these additional
taps are evaluated for high sample rate tracks.
Filter table entries with coefficients that are unchanged are
marked /* ORIGINAL */.
The remaining entries are new and have coefficient values obtained
from src/utils/loudness/loudness.sci. See:
http://lists.xiph.org/pipermail/flac-dev/2012-February/003220.html
Because these filter coefficients can be generated from a known source,
they are preferred to the FooBar2000 coefficients whose provenance is
unknown.
Signed-off-by: Earl Chew <earl_chew@yahoo.com>
This change assumes that a C99 <stdint.h> header is available. For
compilers where that is not the case, the user should provide a
minimal replacement header.