Commit Graph

2488 Commits

Author SHA1 Message Date
Erik de Castro Lopo
7dc5e3a8ff Rename _flac_stat to flac_stat_s. 2013-03-29 21:25:59 +11:00
Erik de Castro Lopo
608e246f52 Rename all 'utf8_io' -> 'win_utf8_io'. 2013-03-29 21:25:59 +11:00
Erik de Castro Lopo
5705b4d7b2 Huge Windows utf8 I/O patch.
Patch from Janne Hyvärinen <cse@sci.fi>.
2013-03-29 21:25:59 +11:00
Erik de Castro Lopo
9b8fdafe3a src/test_libFLAC/decoders.c : Minor improvement. 2013-03-29 20:54:34 +11:00
Miroslav Lichvar
1ec6e3a064 Fix option names in documentation and help messages.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2013-03-29 16:31:15 +11:00
Erik de Castro Lopo
14c28ae485 Replace a couple of safe_strncpy/cat with snprintf. 2013-03-21 17:28:47 +11:00
Erik de Castro Lopo
2d6354ff2a Replace broken str* functions with safe versions. 2013-03-19 20:23:44 +11:00
Erik de Castro Lopo
c152d1adf9 More Microsoft Visual Studio project file updates.
Patch from Janne Hyvärinen <cse@sci.fi>.
2013-03-18 06:22:57 +11:00
Erik de Castro Lopo
74aac94cda Windows flac_snprintf tweaks.
Patch from Janne Hyvärinen <cse@sci.fi>.
2013-03-17 22:06:11 +11:00
Erik de Castro Lopo
3c84f9e86b Use new function flac_snprintf() where ever appropriate.
This replaces un-safe usage of sprintf() and Micorsoft's _snprintf()
with something sane.
2013-03-17 21:00:07 +11:00
Erik de Castro Lopo
06af237c70 Add file src/share/grabbag/snprintf.c to grabbag library.
Define function flac_snprintf() which has ISO C99 snprintf() behavior
even when compiling with Microsoft Visual Studio, by wrapping the
MSVS snprintf_s() function.
2013-03-17 20:52:04 +11:00
Erik de Castro Lopo
f86b1a3353 Wave64 patch from Janne Hyvrinen <cse@sci.fi>.
GUID had one word incorrectly in little endian order.
2013-03-17 18:28:57 +11:00
Erik de Castro Lopo
f25b2602dc Fix a couple of Windows 2Gig file size issues.
Patch submitted by Janne Hyvärinen <cse@sci.fi>.
2013-03-14 18:22:37 +11:00
Erik de Castro Lopo
300d17c56f MS VS : Add alloc.c to the grabbag static build.
Patch from Janne Hyvärinen <cse@sci.fi>.
2013-03-12 19:15:04 +11:00
Erik de Castro Lopo
9edb817dd2 MS VS inline/extern fix from Ben Alison plus comments.
Add explicit extern to functions that are locally declared inline
but which also have non-inline public prototypes.

It seems MS VS does not quite meet the C99 spec (section 6.7.4).
2013-03-12 17:12:07 +11:00
Erik de Castro Lopo
96a5ba7120 Fix -Wshadow warnings. 2013-03-11 06:06:34 +11:00
Erik de Castro Lopo
0a2b901e99 src/libFLAC/include/private/macros.h : Fix flac_min.
The existing flac_min macro was generating -Wshadow compiler warnings
when nested.
2013-03-11 06:06:34 +11:00
Erik de Castro Lopo
dd1fa80883 Fix -Wstrict-prototypes -Wmissing-prototypes warnings.
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'.
2013-03-11 06:06:33 +11:00
Erik de Castro Lopo
168c258aa3 Purge old un-maintained MSVC 6 project files. 2013-03-10 11:17:20 +11:00
Erik de Castro Lopo
1ad32efb89 Version 1.3.0pre2. 2013-03-09 22:06:12 +11:00
Erik de Castro Lopo
139ffb090d Fix version number in Visual Studio project files.
Patch from Ben Allison <benski@winamp.com> and tweaked to change
version from 1.3.0 (which hasn't been released yet) to 1.3.0pre1.
2013-03-08 21:06:48 +11:00
Erik de Castro Lopo
fd6b192d25 Another MSVC patch from Ben Alison. 2013-03-08 20:47:43 +11:00
Erik de Castro Lopo
a4c321e492 Large patch from Ben Allison fixing the MSVC build.
Patch tweaked a little to fix Linux build and clean up minor problems.
2013-03-06 22:17:51 +11:00
Erik de Castro Lopo
91790ef965 Fix compiler warnings from new compiler flags. 2013-03-06 07:42:08 +11:00
Erik de Castro Lopo
9b11da76a4 src/flac/main.c : Mention --ignore-chunk-sizes in help output.
Also mention --no-ignore-chunk-sizes option.
2013-03-05 17:35:21 +11:00
Erik de Castro Lopo
2227ec7936 src/flac/decode.c : Remove repeated code block. 2013-03-02 19:06:20 +11:00
Erik de Castro Lopo
c8adb080b0 Add appropriate WAV channel masks for 7 and 8 channel files.
This commit accepts the new default channel masks for 6.1 and 7.1
surround input WAV files, and writes the corresponding masks when
decoding to WAV without a channel mask from the metadata block.

The local copy of the format spec is also updated with the new text
from the flac-website repository.

Patch from Ralph Giles <giles@mozilla.com>
2013-03-02 14:09:46 +11:00
Timothy B. Terriberry
81c917829a xmms - Fix inline linking problems with old glib
f0296255 switched to --std=c99 by default, but old glib relies on
 the pre-C99 extern inline rules.
Override G_INLINE_FUNC for it to avoid multiple definition linker
 errors.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2013-02-08 18:58:29 +11:00
Timothy B. Terriberry
100c82e18b xmms - #include <inttypes.h> for PRIu64
Not sure where this was coming from before, but it's not getting
 included elsewhere on my system, so include it explicitly.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2013-02-08 18:58:25 +11:00
Timothy B. Terriberry
5c8bb1333f xmms - Fix libtool usage.
9b7cb22f removed the extra libtool-disable-static script in favor
 of always building with disable-static, but plugin_xmms still
 referenced libtool-disable-static explicitly.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2013-02-08 18:58:21 +11:00
Ralph Giles
f1841caba3 Hoist a repeated conditional in the channel mapping code.
This is equivalent and just makes the code shorter.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2013-01-18 16:46:35 +11:00
Erik de Castro Lopo
fb13acc457 Revert parts of 96d081c1 that touched source code or autotools files. 2013-01-03 06:25:21 +11:00
Erik de Castro Lopo
f67928dec4 Fix VC project files to use /objs/ directory instead of /obj/ directory. 2013-01-02 22:49:55 +11:00
Erik de Castro Lopo
85d5c53803 Fix all Makefile.lite to use /objs/ directory instead of /obj/ directory. 2013-01-02 22:49:37 +11:00
Hendricks266
96d081c1c9 Fix building with MSYS and MinGW(-w64); Improve Makefile.lite build system
This is a patch to allow building of the project using MSYS, MinGW, and MinGW-w64 with the following invocation:

make -f Makefile.lite libFLAC libFLAC++ flac metaflac test_libs_common test_libFLAC test_libFLAC++ test_grabbag test_seeking test_streams utils examples

This patch addresses eight points:
1. `uname -p` in MSYS returns "unknown" so we must use `gcc -dumpmachine` to gain information about the target, 32-bit or 64-bit.
2. MinGW-w64 does not ship with a working iconv.h, so we must disable it under this specific compiler.
3. The code requires <inttypes.h> in a handful of C files, but config.mk did not contain -DHAVE_INTTYPES_H, which under the full build process (I assume) is added by autoconf.
4. The compiler complained when lround() in lpc.c was static, so it is no longer static.
5. Additional scattered linking directives (and reordering) (particularly FLAC, grabbag, and replaygain_analysis) were necessary to build some of the components.
6. The Makefile.lite build system benefited from some cleanup, particularly by rigorously defining all entries, factoring redundancy, and establishing dependencies. (Some typos were fixed too.)
7. Shared objects on Windows use .dll, not .so. (Added *.dll, *.dylib, and *.exe to .gitignore.)
8. To allow more freedom using Makefile.lite without configure, I added the variables USE_OGG and USE_ICONV which can toggle these two components in the build process.
ex: make -f Makefile.lite examples USE_OGG=0 USE_ICONV=0

These improvements make use of some use-time Makefile variable expansion.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2013-01-02 21:35:47 +11:00
nu774
0da96d3cfd Fix to allow the flac command to parse piped WAV input with
WAVEFORMATEXTENSIBLE format.

MinGW's fseeko() doesn't return error for the attempt to seek on non
seekable file (same behavior as MSVC).
The simplest solution would be to change #ifdef _MSC_VER to #ifdef
_WIN32 here.
Instead, this patch tests file with fstat(), and use fseeko() only when
it is a regular file.
This is confirmed to work properly both on MSVC and MinGW, can seek if
stdin is a redirected regular file, and doesn't require #ifdef.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2012-12-28 11:31:35 +11:00
Max Horn
66c0a581d2 autogen.sh: replace this by a simple call to autoreconf
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>
2012-12-13 08:12:14 +11:00
Timothy B. Terriberry
0920bc1ffb Fix a copy & paste error in a comment. 2012-12-09 13:13:12 +11:00
Erik de Castro Lopo
762ae01893 Covert 2 C source files from dos to unix line endings. 2012-12-06 06:42:34 +11:00
Miroslav Lichvar
6a1f59b58f Update FSF address. 2012-12-06 06:17:26 +11:00
Miroslav Lichvar
a43f56c0b2 Update library version-info. 2012-12-04 17:45:51 +11:00
Miroslav Lichvar
49b9673c89 Hide symbols with nasm.
Hide all cglobal symbols with nasm >= 2.
2012-12-04 17:45:32 +11:00
Miroslav Lichvar
19c78e58d7 Hide symbols with gcc.
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.
2012-12-04 17:45:06 +11:00
Miroslav Lichvar
7edf67769f Remove old GNU-stack sections from nasm files.
They are not needed since the section is defined in nasm.h.
2012-12-04 17:43:49 +11:00
Erik de Castro Lopo
70be52b1dd src/libFLAC/stream_encoder.c : Fix typo.
FLAC__treamEncoderReadStatusString -> FLAC__StreamEncoderReadStatusString

Thanks to nu774 on github.
2012-11-30 15:33:59 +11:00
Erik de Castro Lopo
86efeb5903 Replace printfs with "%s" format strings with puts.
Thanks to Elan Ruusamäe for the suggestion.
2012-11-13 17:26:08 +11:00
Erik de Castro Lopo
1f0daccf2b Add a regresion test for compression levels. 2012-10-14 21:40:40 +11:00
Erik de Castro Lopo
fc360735ce Fix a regression that severely impacted compression levels.
Regression was introducted in commit 8bbbf56403
(Feb 1 19:58:09 2012) when fixing compiler warnings. In src/libFLAC/lpc.c the
line:

        ref[i] = (r/=err);

was erroniously removed because the left hand side, ref[i] was never used.
Obviously, the correct thing to do was to replace that line with:

        r /= err;

This code has not been officially released. The only people who would have
been affected are people who compiled FLAC from git between February and
now.

The only adverse affect of this error was that compression ratio would have
been severely compromised. No audio is lost, and if anyone has a file that
compressed with a bad version of FLAC can decompress it to WAV and then
re-compress with a fixed version.
2012-10-12 22:02:49 +11:00
Erik de Castro Lopo
b21f190861 Add a convenience function to create a Metadata::Padding object with a
certain size in one statement.

Patch from Bastiaan Timmer <basjetimmer@yahoo.com>
2012-09-11 15:52:24 +10:00
Miroslav Lichvar
8d9e5c6e8e Optimize FLAC__bitreader_read_rice_signed_block.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2012-08-28 21:17:18 +10:00