5 years agoDetect Clang masquerading as GCC.
Erik de Castro Lopo [Fri, 22 Nov 2013 07:13:36 +0000 (18:13 +1100)]
Detect Clang masquerading as GCC.

Autoconf detects the Clang compiler as GNU GCC (clang sets defines like
__GNUC__ etc) but Clang is *not* completely compatible. If we detect
Clang we set ac_vc_c_compiler_gnu to 'no'.

5 years agoSilence warning message when doxygen disabled.
Erik de Castro Lopo [Tue, 15 Oct 2013 07:01:28 +0000 (18:01 +1100)]
Silence warning message when doxygen disabled.

5 years agolibFLAC/stream_encoder.c : Fix MSVS profiler hot spot.
Erik de Castro Lopo [Thu, 10 Oct 2013 10:31:50 +0000 (21:31 +1100)]
libFLAC/stream_encoder.c : Fix MSVS profiler hot spot.

Patch-from: vqcl <lvqcl.mail@gmail.com>

5 years agowin_utf8_io_static.vcproj : LF -> CRLF conversion.
Erik de Castro Lopo [Thu, 10 Oct 2013 08:22:06 +0000 (19:22 +1100)]
win_utf8_io_static.vcproj : LF -> CRLF conversion.

5 years agoAdds use of restrict keyword to improve encoding speed.
Erik de Castro Lopo [Thu, 10 Oct 2013 07:24:19 +0000 (18:24 +1100)]
Adds use of restrict keyword to improve encoding speed.

Restrict works very poorly in Visual Studio (much slower than without)
so defined flac_restrict in share/compat.h and use that in:


As a result, FLAC__lpc_compute_residual_from_qlp_coefficients_wide_intrin_sse41()
offers no advantage for 64-bit compiles and was removed from x86-64 part
of stream_encoder.c

Patch-from: lvqcl <lvqcl.mail@gmail.com>

5 years agoVcproj file updates.
Erik de Castro Lopo [Fri, 4 Oct 2013 03:50:01 +0000 (13:50 +1000)]
Vcproj file updates.

and so on.

when possible.

Also, in the current version "Whole program optimization" compiler option
is set, but the corresponding linker option isn't. From MSDN:
   "If you do not explicitly specify /LTCG when you pass /GL or MSIL modules
   to the linker, the linker eventually detects this and restarts the link
   by using /LTCG. Explicitly specify /LTCG when you pass /GL and MSIL modules
   to the linker for the fastest possible build performance."
So /LTCG option was added too.

Debug build now uses libogg_static.lib from .\objs\debug\lib folder.
(the dependency for both release and debug is

Patch-from: lvqcl <lvqcl.mail@gmail.com>

5 years agoImprove x86 instrinsic implementation.
Erik de Castro Lopo [Thu, 3 Oct 2013 15:38:00 +0000 (01:38 +1000)]
Improve x86 instrinsic implementation.

* Splits lpc_x86intrin.c to lpc_intrin_sse.c and lpc_intrin_sse2.c
* Add FLAC__lpc_compute_residual_from_qlp_coefficients_intrin_sse2()
  function to lpc_intrin_sse2.c
* Add lpc_intrin_sse41.c with two ..._wide_intrin_sse41() functions
  (useful for 24-bit en-/decoding)
* Add precompute_partition_info_sums_intrin_sse2() / ...ssse3() and
  disables precompute_partition_info_sums_32bit_asm_ia32_().
  SSE2 version uses 4 SSE2 instructions instead of 1 SSSE3 instruction
  PABSD so it is slightly slower.

Patch-from: lvqcl <lvqcl.mail@gmail.com>

5 years agoAdd FLAC__HAS_X86INTRIN to vcproj files.
Erik de Castro Lopo [Thu, 26 Sep 2013 17:10:34 +0000 (03:10 +1000)]
Add FLAC__HAS_X86INTRIN to vcproj files.

Patch-from: lvqcl <lvqcl.mail@gmail.com>

5 years agoFLAC.sln : Fix for MSVS 2005.
Erik de Castro Lopo [Thu, 26 Sep 2013 17:07:48 +0000 (03:07 +1000)]
FLAC.sln : Fix for MSVS 2005.

Patch-from: lvqcl <lvqcl.mail@gmail.com>

5 years agoMove M_PI definition to include/share/compat.h.
Erik de Castro Lopo [Thu, 26 Sep 2013 17:05:02 +0000 (03:05 +1000)]
Move M_PI definition to include/share/compat.h.

Patch-from: lvqcl <lvqcl.mail@gmail.com>

5 years agoFix documentation rice partition order
Martijn van Beurden [Wed, 18 Sep 2013 16:51:17 +0000 (18:51 +0200)]
Fix documentation rice partition order

For some reason all documentation lists the max rice partition
order to be 16, while the maximum is 15. This fixes flac -H, the
man page and the HTML source code documentation

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
5 years agoconfigure.ac : Tweaks.
Erik de Castro Lopo [Wed, 25 Sep 2013 13:26:49 +0000 (23:26 +1000)]
configure.ac : Tweaks.

* Add FLAC__ALIGN_MALLOC_DATA for x86_64.
* Removes XIPH_ADD_CFLAGS([-msse]) as -msse2 implies -msse.
* Fix typo.

Patch-from: lvqcl <lvqcl.mail@gmail.com>

5 years agoreplaygain_synthesis.c : Replace float literal with double literal.
Erik de Castro Lopo [Wed, 25 Sep 2013 13:19:57 +0000 (23:19 +1000)]
replaygain_synthesis.c : Replace float literal with double literal.

The variable its multipled by is double so there is no sense in
having the literal as a float.

Patch-from: lvqcl <lvqcl.mail@gmail.com>

5 years agoRemove union data from FLAC__CPUInfo.
Erik de Castro Lopo [Wed, 25 Sep 2013 13:07:42 +0000 (23:07 +1000)]
Remove union data from FLAC__CPUInfo.

Before this patch it was possible to set or get data.ia32.sse3 value
from x86-64 code, etc which is a potential source of errors.

Patch-from: lvqcl <lvqcl.mail@gmail.com>

5 years agoAdd SSE4.1/SSE4.2 detection.
Erik de Castro Lopo [Wed, 25 Sep 2013 13:05:13 +0000 (23:05 +1000)]
Add SSE4.1/SSE4.2 detection.

Patch-from: lvqcl <lvqcl.mail@gmail.com>

5 years agoFix minor Makefile.am issues arising from 943384d7c33.
Erik de Castro Lopo [Tue, 17 Sep 2013 20:29:31 +0000 (06:29 +1000)]
Fix minor Makefile.am issues arising from 943384d7c33.

Commit 943384d7c33 removed two directories in the doc/ tree and
those directories had to be removed from the Makefile.ams one
level up.

5 years agoClean up source documentation
Martijn van Beurden [Tue, 17 Sep 2013 17:18:28 +0000 (19:18 +0200)]
Clean up source documentation

This patch removes all content that is better viewed online (i.e.
downloads, links etc.) and not necessary for development.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
5 years agoConvert logo to SVG
Martijn van Beurden [Mon, 16 Sep 2013 18:06:17 +0000 (20:06 +0200)]
Convert logo to SVG

While developing FLAC Frontend, there where several occasions where
I felt little restrained because the FLAC logo is available only in
gif. I made an SVG version and rendered a new GIF version from it.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
5 years agoFactor out common test functionality to test/common.sh.in.
Erik de Castro Lopo [Mon, 16 Sep 2013 09:55:11 +0000 (19:55 +1000)]
Factor out common test functionality to test/common.sh.in.

5 years agoSwitch test scripts to bash.
Erik de Castro Lopo [Mon, 16 Sep 2013 09:34:59 +0000 (19:34 +1000)]
Switch test scripts to bash.

5 years agoFix/re-enable SSE/SSE2 lpc optimisations.
Erik de Castro Lopo [Sun, 15 Sep 2013 10:34:40 +0000 (20:34 +1000)]
Fix/re-enable SSE/SSE2 lpc optimisations.

5 years agotest/test_seeking.sh : Fix detection of Ogg support.
Erik de Castro Lopo [Sun, 15 Sep 2013 09:58:35 +0000 (19:58 +1000)]
test/test_seeking.sh : Fix detection of Ogg support.

5 years agoconfigure.ac : Report Ogg/FLAC support.
Erik de Castro Lopo [Sun, 15 Sep 2013 09:58:05 +0000 (19:58 +1000)]
configure.ac : Report Ogg/FLAC support.

5 years agoOnly allow SSE2 intrinsics for x86_64.
Erik de Castro Lopo [Sun, 15 Sep 2013 09:37:53 +0000 (19:37 +1000)]
Only allow SSE2 intrinsics for x86_64.

5 years agoFix numerous warnings arising from addition of -Weffc++.
Erik de Castro Lopo [Sun, 15 Sep 2013 08:10:55 +0000 (18:10 +1000)]
Fix numerous warnings arising from addition of -Weffc++.

5 years agoconfigure.ac : Add -Weffc++ to CXXFLAGS.
Erik de Castro Lopo [Sun, 15 Sep 2013 08:09:48 +0000 (18:09 +1000)]
configure.ac : Add -Weffc++ to CXXFLAGS.

Also rearrange CFLAGS somewhat.

5 years agosrc/libFLAC/lpc.c : Fix compiler warning.
Erik de Castro Lopo [Sun, 15 Sep 2013 00:22:01 +0000 (10:22 +1000)]
src/libFLAC/lpc.c : Fix compiler warning.

5 years agolpc_x86intrin.c : Tweaks.
Erik de Castro Lopo [Sun, 15 Sep 2013 00:09:02 +0000 (10:09 +1000)]
lpc_x86intrin.c : Tweaks.

Include <config.h> before trying to use values defined in that file.
Fix compiler warnings.

5 years agoAdds SSE-accelerated lpc functions.
Erik de Castro Lopo [Sat, 14 Sep 2013 23:51:28 +0000 (09:51 +1000)]
Adds SSE-accelerated lpc functions.

New functions are:

Patch-from: lvqcl <lvqcl.mail@gmail.com>

5 years agoAdd CPU features (sse3, ssse3) detection code for x86-64.
Erik de Castro Lopo [Sat, 14 Sep 2013 23:46:17 +0000 (09:46 +1000)]
Add CPU features (sse3, ssse3) detection code for x86-64.

Patch-from: lvqcl <lvqcl.mail@gmail.com>

5 years agoconfigure.ac : Prepare for x86_64 initrinsics based optimisations.
Erik de Castro Lopo [Sat, 14 Sep 2013 23:42:29 +0000 (09:42 +1000)]
configure.ac : Prepare for x86_64 initrinsics based optimisations.

Detect presence of <x86intrin.h> and set FLAC__HAS_X86INTRIN.
Define FLAC__CPU_X86_64 when CPU is x96_64.

5 years agobitmath.h : Minor improvements.
Erik de Castro Lopo [Sun, 8 Sep 2013 02:15:40 +0000 (12:15 +1000)]
bitmath.h : Minor improvements.

This is part of a larger patch from lvqcl.

Patch-from: lvqcl <lvqcl.mail@gmail.com>

5 years agoMove defintion of M_LN2 to include/share/compat.h.
Erik de Castro Lopo [Sat, 7 Sep 2013 09:19:36 +0000 (19:19 +1000)]
Move defintion of M_LN2 to include/share/compat.h.

5 years agoMSVS : Define _USE_MATH_DEFINES.
Erik de Castro Lopo [Sat, 7 Sep 2013 09:13:43 +0000 (19:13 +1000)]

MSVS does defined the M_LN2 constant in <math.h> but only makes it
visible if _USE_MATH_DEFINES is defined.

Patch-from: lvqcl <lvqcl.mail@gmail.com>

5 years agoRename win_utf8_io.lib -> win_utf8_io_static.lib.
Erik de Castro Lopo [Thu, 5 Sep 2013 10:10:16 +0000 (20:10 +1000)]
Rename win_utf8_io.lib -> win_utf8_io_static.lib.

All MSVS projects that generate .lib files have '_static' suffix in their
names; all but win_utf8_io.

Patch-from: lvqcl <lvqcl.mail@gmail.com>

5 years agoMSVS : Fix library output directory.
Erik de Castro Lopo [Thu, 5 Sep 2013 10:07:06 +0000 (20:07 +1000)]
MSVS : Fix library output directory.

Fix the output directory for plugin_common_static.vcproj and

Patch-from: lvqcl <lvqcl.mail@gmail.com>

5 years agoMSVS : Add FLAC__ALIGN_MALLOC_DATA definition for MSVS projects.
Erik de Castro Lopo [Thu, 5 Sep 2013 10:05:29 +0000 (20:05 +1000)]
MSVS : Add FLAC__ALIGN_MALLOC_DATA definition for MSVS projects.

A preprocessor macro FLAC__ALIGN_MALLOC_DATA is defined in the Makefiles
but absent in *.vcproj files. This patch adds it to libFLAC_static.vcproj
and libFLAC_dynamic.vcproj.

Patch-from: lvqcl <lvqcl.mail@gmail.com>

5 years agosrc/flac/iffscan.c : Fix typo.
Erik de Castro Lopo [Thu, 5 Sep 2013 09:50:36 +0000 (19:50 +1000)]
src/flac/iffscan.c : Fix typo.

Patch-from: lvqcl <lvqcl.mail@gmail.com>

5 years agoinclude/share/compat.h : Remove deinition of restrict.
Erik de Castro Lopo [Sun, 1 Sep 2013 00:32:48 +0000 (10:32 +1000)]
include/share/compat.h : Remove deinition of restrict.

Wasn't being used anywhere in the code and clashes with a symbol in

Suggested-by: lvqcl <lvqcl.mail@gmail.com>
5 years agoAdd ASM function FLAC__lpc_compute_autocorrelation_asm_ia32_sse_lag_16.
Erik de Castro Lopo [Sat, 31 Aug 2013 03:40:47 +0000 (13:40 +1000)]
Add ASM function FLAC__lpc_compute_autocorrelation_asm_ia32_sse_lag_16.

For the 32 bit x86 ASM functions there were already versions of this
function for lags (N = 4, 8, 12). They require lpc_order less than N.
The best compression preset (flac -8) uses lpc_order up to 12; it
means that during encoding FLAC also uses unaccelerated C function.

Patch-from: lvqcl <lvqcl.mail@gmail.com>
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
5 years agosrc/libFLAC/cpu.c : Remove MSVC6 only code.
Erik de Castro Lopo [Mon, 26 Aug 2013 11:45:14 +0000 (21:45 +1000)]
src/libFLAC/cpu.c : Remove MSVC6 only code.

Patch from: lvqcl <lvqcl.mail@gmail.com>

5 years agoFix a couple of NASM warnings.
Erik de Castro Lopo [Tue, 13 Aug 2013 09:18:40 +0000 (19:18 +1000)]
Fix a couple of NASM warnings.

Suggested by Ozkan Sezer <sezeroz@gmail.com>.

5 years agosrc/libFLAC/ia32/nasm.h : Fix nasm warning on windows.
Erik de Castro Lopo [Tue, 13 Aug 2013 09:01:41 +0000 (19:01 +1000)]
src/libFLAC/ia32/nasm.h : Fix nasm warning on windows.

Patch from Ozkan Sezer <sezeroz@gmail.com>.

5 years agoconfigure.ac : Improve asm optimisation detection.
Erik de Castro Lopo [Sun, 11 Aug 2013 11:46:18 +0000 (21:46 +1000)]
configure.ac : Improve asm optimisation detection.

When compiling for ia32 on an x86_64 kernel, the configure script
was not detecting the ability to do asm optimisations because the
configure script was detecting the x86_64 kernel not the ia32
user space.

5 years agotest/test_replaygain.sh : Prefer mawk over gawk.
Erik de Castro Lopo [Thu, 1 Aug 2013 20:32:24 +0000 (06:32 +1000)]
test/test_replaygain.sh : Prefer mawk over gawk.

The AWK script used to generate tones for this test fails with gawk
version 4.0.1, but used to work for earlier versions. Use mawk instead
if it exists.

5 years agostream_encoder.c : Improve fix for arithmetic overflow.
Erik de Castro Lopo [Thu, 1 Aug 2013 20:20:53 +0000 (06:20 +1000)]
stream_encoder.c : Improve fix for arithmetic overflow.

Only use the 32 bit accumulator if the input data is 16 bits or less.

5 years agoSplit regain play tests into separate script.
Erik de Castro Lopo [Thu, 1 Aug 2013 20:19:56 +0000 (06:19 +1000)]
Split regain play tests into separate script.

5 years agotest/ : Use new --no-error-on-compression-fail option as needed.
Erik de Castro Lopo [Thu, 1 Aug 2013 13:02:26 +0000 (23:02 +1000)]
test/ : Use new --no-error-on-compression-fail option as needed.

5 years agoflac: Implement --no-error-on-compression-fail command line option.
Erik de Castro Lopo [Mon, 22 Jul 2013 10:32:01 +0000 (20:32 +1000)]
flac: Implement --no-error-on-compression-fail command line option.

This is designed for the test suite where a number of artificially created
files end up bigger than the original.

5 years agoflac : Check compression ratio at end of encode process.
Erik de Castro Lopo [Sun, 21 Jul 2013 12:10:24 +0000 (22:10 +1000)]
flac : Check compression ratio at end of encode process.

Stash the compression ratio in the EncoderSession struct and at the
end of the encode process, check if its > 1.0. Print an error message
if it is.

5 years agostream_encoder.c : Improve fix for arithmetic overflow.
Erik de Castro Lopo [Sun, 21 Jul 2013 10:38:33 +0000 (20:38 +1000)]
stream_encoder.c : Improve fix for arithmetic overflow.

The previous fix (patch 6f7ec60c) had the undesireable effect of slowing
down encoding speed on 16 bit files where the arithmetic overflow was
less likely to happen.

This fix forces the use of a FLAC__uint64 accumulator for 24 bit files
and restores the use of a FLAC_uint32 accumulator for 16 (and less) bit

Unfortunately, I have not been able to prove to myself that this overflow
*cannot* happen with 16 bit files.

5 years agoUpdate .gitignore.
Erik de Castro Lopo [Sun, 21 Jul 2013 10:12:41 +0000 (20:12 +1000)]
Update .gitignore.

5 years agosrc/share/grabbag/replaygain.c : Fix compiler warnings.
Erik de Castro Lopo [Sun, 21 Jul 2013 09:58:18 +0000 (19:58 +1000)]
src/share/grabbag/replaygain.c : Fix compiler warnings.

Gcc 4.8 has a new warning about use of un-initialized data. In particular
this new warning can detect if an automatic variable is defined in one function
and then passed to another and used before it is initialized.

5 years agoLink with -no-undefined regardless of the OS
Cristian Rodríguez [Sun, 21 Jul 2013 05:28:51 +0000 (01:28 -0400)]
Link with -no-undefined regardless of the OS

libFLAC* must never have undefined symbols no matter
what is the target platform.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
5 years agosrc/libFLAC/bitwriter.c : Remove dead code.
Erik de Castro Lopo [Wed, 17 Jul 2013 10:18:46 +0000 (20:18 +1000)]
src/libFLAC/bitwriter.c : Remove dead code.

5 years agostream_encoder.c : Fix an arithmetic overflow in the RICE2 partitioner.
Erik de Castro Lopo [Wed, 17 Jul 2013 08:38:45 +0000 (18:38 +1000)]
stream_encoder.c : Fix an arithmetic overflow in the RICE2 partitioner.

For a specific 24 bit WAV file provided by Leigh Dyer


encoding with compression level 7 was generating a file a couple of
orders of magintude larger than the original.

Debugging showed that variable abs_residual_partition_sum (a FLAC__uint32)
in function precompute_partition_info_sums_() was suffering from an
arithmetic overflowing on some 24 bit input files although this value
overflowing did not always cause larger output files.

Since the value abs_residual_partition_sum is eventually stored in an
array of FLAC__uint64, it makes sense to make abs_residual_partition_sum
a FLAC__uint64 anyway.

Debugging this problem was made easier by use of the Clang compiler's
-fsanitize=integer option.

6 years agosrc/flac/utils.c : Add fflush after printing to stderr.
Erik de Castro Lopo [Mon, 17 Jun 2013 07:57:04 +0000 (17:57 +1000)]
src/flac/utils.c : Add fflush after printing to stderr.

Patch from: MuldeR <mulder2@gmx.de>

6 years agoDisable FLAC__bitreader_read_rice_signed_block_asm_ia32_bswap.
Miroslav Lichvar [Wed, 5 Jun 2013 14:05:18 +0000 (16:05 +0200)]
Disable FLAC__bitreader_read_rice_signed_block_asm_ia32_bswap.

Don't use the assembly function since it seems to be slower than
the current version of FLAC__bitreader_read_rice_signed_block.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
6 years agometaflac : Fix local_strcat() to terminate string correctly.
Miroslav Lichvar [Mon, 3 Jun 2013 11:09:05 +0000 (13:09 +0200)]
metaflac : Fix local_strcat() to terminate string correctly.

The NUL char is written at incorrect place when the destination string
is longer than 0, which causes memory corruption. It was broken by
commit 2d6354ff2a618a79d40edbd4f208b4b07c5422f1.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
6 years agoAdd missing config.h includes
Cristian Rodríguez [Sat, 1 Jun 2013 01:55:55 +0000 (21:55 -0400)]
Add missing config.h includes

All C and C++ files must include config.h

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
6 years agoXMMS plugin : Fix symbol visibility.
Erik de Castro Lopo [Wed, 5 Jun 2013 08:48:19 +0000 (18:48 +1000)]
XMMS plugin : Fix symbol visibility.

FLAC now defaults to building with -fvisibility=hidden on GCC4-ELF
platforms.  This breaks the XMMS plugin.  At least get_iplugin_info()
needs to be externally visible.

Patch from Christian Weisgerber <naddy@mips.inka.de>

6 years agotest/*.sh : Fix MALLOC_PERTURB initialization. 1.3.0
Erik de Castro Lopo [Mon, 27 May 2013 09:22:21 +0000 (19:22 +1000)]
test/*.sh : Fix MALLOC_PERTURB initialization.

Was using '$(date +%N)', but that doesn't work on OSX or *BSD. Switched
to using '$(date +%s)'.

6 years agoREADME : Update version number
Ulrich Klauer [Sun, 26 May 2013 22:49:58 +0000 (00:49 +0200)]
README : Update version number

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
6 years agoLanguage fix: "difference licenses"
Ulrich Klauer [Sun, 26 May 2013 20:53:43 +0000 (22:53 +0200)]
Language fix: "difference licenses"

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
6 years agoUse location of TIOCGWINSZ from autoconf manual
Dagobert Michelsen [Sun, 26 May 2013 21:32:01 +0000 (23:32 +0200)]
Use location of TIOCGWINSZ from autoconf manual

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
6 years agoSun Studio can not include static function from extern inline
Dagobert Michelsen [Sun, 26 May 2013 20:55:12 +0000 (22:55 +0200)]
Sun Studio can not include static function from extern inline

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
6 years agoProperly close HTML comments
Ulrich Klauer [Sun, 26 May 2013 20:12:20 +0000 (22:12 +0200)]
Properly close HTML comments

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
6 years agosrc/flac/main.c : Fix copyright notice
Ulrich Klauer [Sun, 26 May 2013 20:19:50 +0000 (22:19 +0200)]
src/flac/main.c : Fix copyright notice

There is no copyright for 2010, so "2000-2013" should not be used.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
6 years agoDeclare UTF-8 encoding for changelog
Ulrich Klauer [Sun, 26 May 2013 20:07:49 +0000 (22:07 +0200)]
Declare UTF-8 encoding for changelog

The changelog declared "charset=ISO-8859-1", but used a UTF-8 encoded
name. Change the declaration to UTF-8 to fix this.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
6 years agoFix bootstrap on Mac OS X
Xiyue Deng [Fri, 24 May 2013 20:51:29 +0000 (13:51 -0700)]
Fix bootstrap on Mac OS X

* Mac OS X has incomplete installations of gettext/iconv. So stop
  checking for gettext command on Darwin, and install some additional m4
  scripts so it can be bootstrapped on Mac OS X.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
6 years agoSet version to 1.3.0 and update coyprights throughout.
Erik de Castro Lopo [Sat, 25 May 2013 07:11:19 +0000 (17:11 +1000)]
Set version to 1.3.0 and update coyprights throughout.

6 years agoFix gcc version check for private macros
Ulrich Klauer [Sat, 25 May 2013 13:12:33 +0000 (15:12 +0200)]
Fix gcc version check for private macros

Use Benjamin Stiglitz' MIN macros from gcc 4.3 (according to the
changelog, __COUNTER__ was introduced in this version). Previously,
the macros weren't used on any existing gcc version; the first one
would have been 5.5.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
6 years agobitwriter.c : Add missing "extern" declaration
Robert Kausch [Sat, 25 May 2013 12:37:44 +0000 (14:37 +0200)]
bitwriter.c : Add missing "extern" declaration

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
6 years agoFix mistyped variable name
Robert Kausch [Sat, 25 May 2013 12:34:18 +0000 (14:34 +0200)]
Fix mistyped variable name

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
6 years agoCorrectly initialize FLAC_API_SUPPORTS_OGG_FLAC
Ulrich Klauer [Sat, 25 May 2013 12:14:08 +0000 (14:14 +0200)]
Correctly initialize FLAC_API_SUPPORTS_OGG_FLAC

Commits a7e3705d051bafd1cae90f6605287cc1d9f2a18d and
a4c321e492748db0a7e38240699ba420ba88e01c, while trying to simplify how
the FLAC_API_SUPPORTS_OGG_FLAC global variable was initialized,
inadvertently caused it to be always set to false, whether Ogg support
was compiled in or not.

This commit reverts the relevant part to how it looked in the 1.2.1
release, which is verbose but correct.

The problem was found by Robert Kausch <robert.kausch@freac.org>.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
6 years agochangelog.html : Added entries about RICE2 residue coding method.
Erik de Castro Lopo [Sat, 25 May 2013 07:51:17 +0000 (17:51 +1000)]
changelog.html : Added entries about RICE2 residue coding method.

6 years agoFix compiling for Android.
Erik de Castro Lopo [Sat, 25 May 2013 07:12:23 +0000 (17:12 +1000)]
Fix compiling for Android.

Patch from Janne Hyvärinen <cse@sci.fi>.

6 years agoReplace dead anchor
Martijn van Beurden [Wed, 15 May 2013 18:31:03 +0000 (20:31 +0200)]
Replace dead anchor

This fixes a wrong link (dead anchor) in the Doxygen api documentation

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
6 years agoREADME : Remove reference to OS X Project Builder.
Erik de Castro Lopo [Tue, 30 Apr 2013 22:08:11 +0000 (08:08 +1000)]
README : Remove reference to OS X Project Builder.

6 years agoRefer to configure.ac instead of configure.in
Ulrich Klauer [Tue, 30 Apr 2013 21:10:11 +0000 (23:10 +0200)]
Refer to configure.ac instead of configure.in

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
6 years agoPurge old Mac OS X Project Builder directory.
Erik de Castro Lopo [Tue, 30 Apr 2013 15:23:43 +0000 (01:23 +1000)]
Purge old Mac OS X Project Builder directory.

6 years agoRegenerate man/flac.1.
Erik de Castro Lopo [Tue, 30 Apr 2013 07:47:49 +0000 (17:47 +1000)]
Regenerate man/flac.1.

6 years agoFix path to HTML documentation
Ulrich Klauer [Thu, 11 Apr 2013 20:05:17 +0000 (22:05 +0200)]
Fix path to HTML documentation

In the flac(1) man page, fix the path to the HTML documentation. Patch
by Joshua Kwan <joshk@triplehelix.org>, taken from the Debian patch
tracker for flac 1.2.1-6 (02_doc_path.patch).

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
6 years agoUse C locale when reading ReplayGain tag
Ulrich Klauer [Thu, 11 Apr 2013 20:07:49 +0000 (22:07 +0200)]
Use C locale when reading ReplayGain tag

When a locale is in effect that does not use the point as the decimal
mark (e.g., sv_SE or de_DE, which use a comma) and a ReplayGain tag is
read for --apply-replaygain-which-is-not-lossless, the gain value was
misinterpreted (e.g., "-2.29" truncated to "-2"). This is fixed by
resetting the locale to "C" temporarily, based on Josh Coalson's fix
of the dual case (writing ReplayGain tag) in commit cda02d3.

Patch by hhaamu@gmail.com, taken from the Debian patch tracker for
flac 1.2.1-6 (13_replaygain_c_locale.patch).


Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
6 years agoTwo minor compiled fixes for OS/2.
Erik de Castro Lopo [Mon, 29 Apr 2013 11:32:48 +0000 (21:32 +1000)]
Two minor compiled fixes for OS/2.

Patch from Dave Yeo <dave.r.yeo@gmail.com>.

6 years agoVersion 1.3.0pre4. 1.3.0pre4
Erik de Castro Lopo [Sun, 28 Apr 2013 06:29:39 +0000 (16:29 +1000)]
Version 1.3.0pre4.

6 years agotest/test_compression.sh : Test compression level 0 as well.
Erik de Castro Lopo [Sun, 28 Apr 2013 05:52:07 +0000 (15:52 +1000)]
test/test_compression.sh : Test compression level 0 as well.

6 years agoDocument --apply-replaygain-which-is-not-lossless command line option.
Erik de Castro Lopo [Sun, 28 Apr 2013 05:48:41 +0000 (15:48 +1000)]
Document --apply-replaygain-which-is-not-lossless command line option.

6 years agoman/flac.sgml : Document --ignore-chunk-sizes option.
Erik de Castro Lopo [Sun, 28 Apr 2013 04:30:05 +0000 (14:30 +1000)]
man/flac.sgml : Document --ignore-chunk-sizes option.

Also regenerate man/flac.1.

6 years agosrc/flac/encode.c : Use flac_snprintf instead of sprintf.
Erik de Castro Lopo [Sat, 27 Apr 2013 07:24:31 +0000 (17:24 +1000)]
src/flac/encode.c : Use flac_snprintf instead of sprintf.

6 years agoAdd set -e to stop test_metaflac.sh
Martijn van Beurden [Thu, 25 Apr 2013 13:20:23 +0000 (15:20 +0200)]
Add set -e to stop test_metaflac.sh

test_metaflac.sh wasn't aborting when replaygain values were
incorrect because the die() function was embedded in a pipe.
set -e was added so the script exits with a non-zero exit code
when die is called in a pipe.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
6 years agotest/test_metaflac.sh: POSIXify embedded awk script.
Erik de Castro Lopo [Thu, 25 Apr 2013 03:53:21 +0000 (13:53 +1000)]
test/test_metaflac.sh: POSIXify embedded awk script.

The embedded awk script was using the 'lshift' function which
apparently only exists in GNU auk (gawk) and definitely does not
exist in mawk.

Thanks to Martijn van Beurden <mvanb1@gmail.com> for reporting
this issue.

6 years agoReplace usage of $RANDOM in test scripts.
Erik de Castro Lopo [Thu, 25 Apr 2013 02:31:50 +0000 (12:31 +1000)]
Replace usage of $RANDOM in test scripts.

$RANDOM seems to be a bashism and isn't avaiable in eg dash.

6 years agoMetaflac UTF-8 fixes (Windows)
Janne Hyvärinen [Wed, 24 Apr 2013 22:58:08 +0000 (08:58 +1000)]
Metaflac UTF-8 fixes (Windows)

Metaflac can now print all console supported characters from tags on the
screen. It also fixes metaflac to be able to import its own exports back
without non-ascii characters getting mutilated. And --no-utf8-convert
now works properly with import and export commands.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
6 years agoReduce valgrind num-callers to 50
Martijn van Beurden [Sun, 21 Apr 2013 21:12:16 +0000 (23:12 +0200)]
Reduce valgrind num-callers to 50

My Valgrind doesn't run, saying it doesn't support showing more
than 50 entries of a stack trace

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
6 years agoFixes setting test level and valgrind testing
Martijn van Beurden [Sun, 21 Apr 2013 20:05:26 +0000 (22:05 +0200)]
Fixes setting test level and valgrind testing

This should enable using the disable-thorough-tests,
enable-exhaustive-tests and enable-valgrind-testing
configure switches, because setting these didn't do

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
6 years agoFix status print staying on the wrong line with certain filename length.
Janne Hyvärinen [Sun, 21 Apr 2013 11:02:48 +0000 (14:02 +0300)]
Fix status print staying on the wrong line with certain filename length.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
6 years agoFix compile when compiling with FLAC__INTEGER_ONLY_LIBRARY.
Erik de Castro Lopo [Sun, 21 Apr 2013 09:51:47 +0000 (19:51 +1000)]
Fix compile when compiling with FLAC__INTEGER_ONLY_LIBRARY.

Problem reported by Martijn van Beurden <mvanb1@gmail.com>.

6 years agoFix -Wshadow warnings when compiling with mingw-gcc.
Erik de Castro Lopo [Sun, 21 Apr 2013 09:31:54 +0000 (19:31 +1000)]
Fix -Wshadow warnings when compiling with mingw-gcc.

6 years agoMetaflac hex dump UTF-8 and locale fix.
Erik de Castro Lopo [Sun, 21 Apr 2013 08:05:21 +0000 (18:05 +1000)]
Metaflac hex dump UTF-8 and locale fix.

Change metaflac hexdump function so utf-8 decoding is only used for
filename printing and changed hex output printing to not rely only
on isprint. That function seems to return true for tabulator
control character under Windows when application isn't using C-locale.

Patch (with one minor tweak) from Janne Hyvärinen <cse@sci.fi>.