Commit Graph

1911 Commits

Author SHA1 Message Date
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
Miroslav Lichvar
7b37472a2f Add new clz function which works with input 0.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2012-08-28 21:17:15 +10:00
Miroslav Lichvar
d69e807e10 Make FLAC__clz_soft_uint32 static.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2012-08-28 21:17:12 +10:00
Samuli Suominen
12022d90dd Fix assembler code to make it PIC so the dynamic linker does
not have to do text relocations on-the-fly. Patch from Gentoo
via Jaren Stangret <sirjaren@gmail.com>

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2012-07-26 17:21:41 +10:00
Erik de Castro Lopo
a9f3bc8eed Change order of flac_LDADD libs so it works with mingw. 2012-07-04 20:05:11 +10:00
Erik de Castro Lopo
a7e3705d05 Move code inside #ifdef _MSC_VER to compat.h. 2012-06-22 16:03:04 +10:00
Erik de Castro Lopo
5b62b770bc Move all definitions of FLAC__U64L to one place. 2012-06-22 14:52:53 +10:00
Bastiaan Timmer
1294b64996 Adds last functions from C metadata api to C++ metadata api
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2012-06-22 14:35:07 +10:00
Erik de Castro Lopo
8749dc278d Fix building when configured with --disable-shared.
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.
2012-06-22 14:23:56 +10:00
Erik de Castro Lopo
feab11e9bd Fix FLAC__stream_decoder_delete() and FLAC__stream_encoder_delete()
so that they will simply return if passed a NULL pointer (ie just
like the C free() stdlib function).
2012-06-22 13:39:40 +10:00
Cristian Rodríguez
387b72731d bitmath: Finish up optimizations
This patch adds support for other compilers and systems
including MSVC, Intel C compiler etc..

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2012-06-08 19:58:29 +10:00
Erik de Castro Lopo
605f920816 Fix more compiler warnings. 2012-05-08 20:08:06 +10:00
Erik de Castro Lopo
56c3191827 metadata.cpp : Fix compiler warning on 64 bit.
Patch from Bastiaan Timmer <basjetimmer@yahoo.com>.
2012-05-08 19:51:50 +10:00
Erik de Castro Lopo
155719b470 src/libFLAC/lpc.c : Include <inttypes.h> so compiling debug version works. 2012-05-08 19:23:08 +10:00
Erik de Castro Lopo
601e96102c Add missing functions to VorbisComment class.
Patch from Bastiaan Timmer <basjetimmer@yahoo.com> sent to the
<flac-dev@xiph.org> mailing list.
2012-05-08 19:12:58 +10:00
Miroslav Lichvar
5289b309cf Optimize COUNT_ZERO_MSBS macro
Reorder the conditions according to the expected distribution of input
signal. This seems to make it almost as fast as the clz builtin using
the bsr instruction.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2012-05-07 21:45:33 +10:00
Erik de Castro Lopo
d9fde55674 Fix all links to libtool version info rules. 2012-05-07 19:45:23 +10:00
Erik de Castro Lopo
f491b73385 Bump version-info for libFLAC++ from 8:0:2 to 8:0:3. 2012-05-07 19:38:05 +10:00
Erik de Castro Lopo
cd9053cd31 Add functionality present in the C library to the to C++ SeekTable class.
Patch from Bastiaan Timmer <basjetimmer@yahoo.com> sent to the
<flac-dev@xiph.org> mailing list.
2012-05-07 19:22:37 +10:00
Cristian Rodríguez
c2417da842 replace local_strtoull with _strtoui64 in windows
Previous patch replaced the other local_strtoll with _strtoi64
2012-04-18 22:00:59 +10:00
Cristian Rodríguez
7e62afe9fa Remove local_strtoull, windows has equivalent function _strtoui64 2012-04-18 21:59:11 +10:00
Cristian Rodríguez
9b7cb22f84 Update and improve autotools build
- 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...
2012-04-08 09:03:03 +10:00
Erik de Castro Lopo
8340ab3bc8 Use sizeof instead of magic number 4. 2012-04-07 09:00:09 +10:00
Cristian Rodríguez
f13ad37519 Fix make distcheck 2012-04-07 08:36:27 +10:00
Erik de Castro Lopo
425d39b5f8 src/libFLAC/include/private/macros.h : Add copyright header. 2012-04-06 09:58:23 +10:00
Cristian Rodríguez
f029625591 V2: Use a single definition of MIN and MAX in sources 2012-04-06 09:52:06 +10:00
Cristian Rodríguez
d30fe60fc6 remove unnecesary typedef in bitwriter.c 2012-04-06 09:06:17 +10:00
Erik de Castro Lopo
5de949f417 Fix gcc-4.7 compiler warnings. 2012-04-05 21:24:06 +10:00