Commit Graph

534 Commits

Author SHA1 Message Date
Erik de Castro Lopo
45f7d41a8a Fix for missing WINAPI_FAMILY_PARTITION
This is macro identifier is not defined, define it to `0`.
2018-02-10 13:37:55 +11:00
Thomas Zander
7d3f9baedf FLAC++: Add missing prototype for construct_block
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2017-06-23 19:42:49 +10:00
Erik de Castro Lopo
b762a20ace Fix missing SIZE_MAX definition on Android 2017-05-03 18:37:12 +10:00
Erik de Castro Lopo
25b2d82fe4 Fix typos in header files
Patch-from: lvqcl <lvqcl.mail@gmail.com>
2017-03-21 05:39:29 +11:00
Keegan Drake H.P
5121d22e80 stream_decoder.h: Fix Reference to Non-Existent Functions
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Closes: https://github.com/xiph/flac/pull/31
2017-03-16 20:29:30 +11:00
Keegan Drake H.P
d249bce935 stream_decoder.h: Fix References to ``stdout''
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2017-03-16 20:28:39 +11:00
Christian Stadelmann
841ed1aef9 stream encoder: fix documentation inconsistencies
Fixes https://sourceforge.net/p/flac/bugs/452/

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2017-02-13 19:42:46 +11:00
Rosen Penev
c669249e4c Fix compile with cygwin
The underscores are wrong. The comment is also correct.

Also remove the configure.ac option. Otherwise it tries to compile the
windows unicode stuff which POSIX(cygwin) does not understand.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2017-02-09 20:02:18 +11:00
Erik de Castro Lopo
33f093ae2f include/share/compat.h: Only define inline for C
Patch-from: lvqcl <lvqcl.mail@gmail.com>
2017-01-24 06:20:06 +11:00
David Seifert
b3ece71334 Do not override CFLAGS, as CFLAGS is a user flag.
* Furthermore, use NDEBUG globally to detect the presence
  of building with more debug output information.
  AX_CHECK_ENABLE_DEBUG is easier to use, and nowadays
  Gnome has also switched to it from its own custom solution.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2017-01-19 20:47:26 +11:00
Erik de Castro Lopo
3be455142b Add missing file include/share/msvc2005_int.h 2017-01-19 11:17:01 +11:00
Erik de Castro Lopo
1e9e707c6f stdint.h fixes for MSVS 2005/2008
This adds a new msvc2005_int.h header file which is "force included"
as needed by the MSVS project file.

Patch-from: lvqcl <lvqcl.mail@gmail.com>
2017-01-19 06:33:33 +11:00
Erik de Castro Lopo
89a6c52067 metadata.h: Fix search/replace typo in comments 2017-01-17 19:41:44 +11:00
Erik de Castro Lopo
9bb7a7e0f5 Yet more unsigned fixes 2017-01-16 18:28:31 +11:00
Erik de Castro Lopo
71b909b7a4 Yet more purging of unsigned type 2017-01-15 09:48:42 +11:00
Erik de Castro Lopo
588689b138 include/FLAC: More unsigned fixes
These fixes are in the public API, but FLAC would have been extremely
unlikely to work in any system where `unsigned` was not 32 bits.
Therefore we do not treat this as an API change.
2017-01-14 20:24:13 +11:00
Erik de Castro Lopo
6b00dc26b2 Another bulk update of copyright dates 2016-12-05 19:07:13 +11:00
Erik de Castro Lopo
6a5fe43b7e Bulk update copyright dates 2016-12-05 06:35:39 +11:00
Erik de Castro Lopo
74e751c421 libFLAC: Set decoding status if write callback failed
Previously, it the write callback failed the error status
would be set to `FLAC__STREAM_DECODER_READ_FRAME`. Now it
gets set to `FLAC__STREAM_DECODER_WRITE_STATUS_ABORT`.

Patch-from: lvqcl <lvqcl.mail@gmail.com>
2016-07-13 19:42:25 +10:00
Erik de Castro Lopo
c4141f6132 Another Windows build fix
Patch-from: lvqcl <lvqcl.mail@gmail.com>
2016-02-11 18:23:34 +11:00
Erik de Castro Lopo
ab61102209 More Windows fixes
These fixes got lost in an earlier commit.

Patch-from: lvqcl <lvqcl.mail@gmail.com>
2016-02-09 17:56:55 +11:00
Erik de Castro Lopo
52522f3a71 More make distcheck fixes
* Add two missing files to repo.
* Add files to Makefile.am `EXTRA_DIST` list.
2016-02-09 14:05:50 +11:00
Erik de Castro Lopo
d40a6bc695 libFLAC: Remove win_utf8_io dependency
Path-from: lvqcl <lvqcl.mail@gmail.com>
2016-02-08 22:04:12 +11:00
Erik de Castro Lopo
7be5df6c7f Refactoring of win_utf8_io
* Simplifies *print functions.
* Improves file related functions.
* Preparation to move all file related functions into libFLAC.

Patch-from: lvqcl <lvqcl.mail@gmail.com>
2016-01-31 12:42:26 +11:00
Erik de Castro Lopo
6c03ab204a Clean up #includes
Patch-from: lvqcl <lvqcl.mail@gmail.com>
2016-01-24 08:08:55 +11:00
Erik de Castro Lopo
293d6b22cd macros.h: Make FLAC_CHECK_RETURN print to stderr
Also comment the fact that this macro should only be used for things
that are extremely unlikely to fail.
2016-01-19 18:20:25 +11:00
Erik de Castro Lopo
6cc1cbad2c libFLAC: Support 64bit brword/bwword
This patch allows FLAC__BYTES_PER_WORD to be set to 8, but is disabled by
default.

Patch-from: lvqcl <lvqcl.mail@gmail.com>
2016-01-04 10:31:35 +11:00
Erik de Castro Lopo
0a0e5363ad libFLAC: Tweak MSVC support
Visual Studio 2013 and newer has better support for C99.

Patch-from: lvqcl <lvqcl.mail@gmail.com>
2016-01-04 10:31:18 +11:00
Erik de Castro Lopo
46d3a4c6f1 Couple of minor tweaks
Patch-from: lvqcl <lvqcl.mail@gmail.com>
2015-12-30 05:10:58 +11:00
Erik de Castro Lopo
e4399a02ae Whitespace only
Patch-from: lvqcl <lvqcl.mail@gmail.com>
2015-12-25 09:39:34 +11:00
Thomas Zander
7189069e5e Explicitly use base class virtual methods; silence unnecessary warning
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2015-12-25 07:32:17 +11:00
Erik de Castro Lopo
a51b27c0ed Remove (defined _MSC_VER) from cpp workaround
Patch-from: lvqcl <lvqcl.mail@gmail.com>
2015-12-10 06:12:19 +11:00
Erik de Castro Lopo
d9ae5e9128 libFLAC: Add function safe_realloc_()
The new function wraps, realloc() and if the realloc() fails, it
free()s the old pointer.

This is an improvement on the potential realloc() memory leak that
was fixed in 15a9062609.

Still needs fuzzing to validate it.
2015-08-22 19:39:37 +10:00
Erik de Castro Lopo
1123087821 Compat: Fix for MSVC deprecated functions
According to MSDN, stricmp and strnicmp functions are deprecated
since MSVC 2005 and _stricmp/_strnicmp should be used instead.

Patch-from: lvqcl <lvqcl.mail@gmail.com>
2015-08-09 08:42:41 +10:00
Erik de Castro Lopo
7c3cd3d908 Update grabbag tests to work out-of-tree. 2015-02-15 20:37:40 +11:00
Erik de Castro Lopo
eb753ae5b4 Remove traiing whitespace (mostly .c and .h files).
Patch-from: lvqcl <lvqcl.mail@gmail.com>
2014-12-05 05:52:30 +11:00
Zoë Blade
7b757e46f2 Fix some minor word duplication
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2014-12-03 21:43:03 +11:00
Erik de Castro Lopo
39d9791b03 More date fixes. 2014-11-25 20:02:22 +11:00
Erik de Castro Lopo
1437391577 Update copyright years to include 2014. 2014-11-25 13:04:30 +11:00
Erik de Castro Lopo
b7d13c0716 include/share/endswap.h : Fix usage of HAVE_BSWAP16.
The code was incorrectly using #ifndef on a value that was always defined
to a value of either 0 or 1.
2014-11-12 07:06:20 -08:00
Martijn van Beurden
3af2f2b39c Update documentation for new compression presets
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2014-11-11 06:20:43 -08:00
Ralph Giles
7a671e7c41 Use a configure check for bswap16 instead of gcc version #ifdefs.
Fixes a build problem on apple clang.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2014-11-04 21:18:48 -08:00
Erik de Castro Lopo
1c7e3f100f Windows specific vsnprintf fixes.
* Changes flac_snprintf (in src/share/grabbag/snprintf.c) and its copy
  local_snprintf (src/libFLAC/metadata_iterators.c) to be almost sane.

* Adds flac_vsnprintf (src/share/grabbag/snprintf.c) and its copy
  local_vsnprintf (src/share/win_utf8_io/win_utf8_io.c).

* Changes stats_print_info in src/flac/utils.c so it uses flac_vsnprintf
  instead of vsnprintf. This makes return value checking unnecessary.

Patch-from: lvqcl <lvqcl.mail@gmail.com>
2014-09-22 18:29:36 +10:00
Martijn van Beurden
29a28338c3 Add partial_tukey and punchout_tukey apodization functions
Adds two new apodization functions that seem to perform better than
the apodization functions currently in the codebase and fixes three
existing windows as well.

Its important to note that this patch only affects the encoder stage
that evaluates various possible predictors. Audio encoded with these
new windows will still decode with existing legacy decoders.

= Theory =
These functions are used to window the  audio data at the predictor
stage. These news functions enable the use of only part of the signal
to generate a predictor. This helps  because short transients can
introduce noise into the predictor. The  predictor becomes very good
at prediciting one part of the  signal, instead of mediocre for the
whole block.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2014-09-22 18:03:24 +10:00
Erik de Castro Lopo
b373c8ecb4 Minor clean up of win_utf8_io.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
2014-09-21 08:06:48 +10:00
Erik de Castro Lopo
7c66452886 include/share/endswap.h : Improvements to fallthrough ENDSWAP_*.
According to patch author GCC can optimize expressions like
"(a<<8)|(a>>8)", but has problems with "(a<<8)+(a>>8)".

Patch-from: lvqcl <lvqcl.mail@gmail.com>
2014-08-09 12:49:38 +10:00
Erik de Castro Lopo
b08c520d33 include/share/endswap.h : Fix default ENDSWAP_16.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
2014-07-13 20:37:00 +10:00
Ralph Giles
22d4893d28 Fix bswap16 issue on Debian 6.
Versions of GCC prior to 4.8 didn't provide an implementation
of __builtin_bswap16 on x86_64. Detect those versions and
supply a fallback implementation. A cleaner fix would be
to detect bswap16 independently of bswap32 in configure
and handle them separately.

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52624

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2014-07-03 18:59:49 +10:00
Erik de Castro Lopo
0d1cb19525 include/share/endswap.h : Fix fallback ENDSWAP_16 macro. 2014-06-30 09:20:09 +10:00
Erik de Castro Lopo
699e7c457a include/share/endswap.h : Add endswapping of 16 bit values.
Also add macros H2LE_16 and H2LE_32, which do host to little-endian
swapping of 16 and 32 bit values respectively.
2014-06-29 20:20:06 +10:00