Commit Graph

340 Commits

Author SHA1 Message Date
Martijn van Beurden
e00d9b881f
Update copyright year and maintainer status 2023-06-06 22:08:24 +02:00
Martijn van Beurden
fd890034a5
Fix compression level 8 in API docs 2023-06-01 19:16:03 +02:00
Martijn van Beurden
1619af5a36
Update changelog and library version numbers 2023-05-30 07:41:35 +02:00
Martijn van Beurden
b11677e052 Add API function FLAC__metadata_object_set_raw
Add an API function to directly input binary FLAC data to get a
FLAC__StreamMetadata struct. The use mirrors
FLAC__metadata_object_get_raw
2023-03-19 22:37:40 +01:00
Martijn van Beurden
b54eabdf0d Add API function FLAC__metadata_object_get_raw
Add an API function to directly output binary FLAC data corresponding
to a certain FLAC__StreamMetadata struct
2023-03-19 22:37:40 +01:00
Martijn van Beurden
0a52c6fd5c
Replace own bool with stdbool.h, check for header being available 2023-01-07 09:58:00 +01:00
Martijn van Beurden
a73e70c8f4 Also check asserts in fuzzing 2022-11-09 07:19:31 +01:00
Martijn van Beurden
396313c9d0 [doxygen] Change links from local to xiph.org/flac 2022-10-19 17:09:57 +02:00
Ozkan Sezer
c0a6701bc0 fix a typo in stream_encoder.h
fixes doxygen error:
include/FLAC/stream_encoder.h:1298: Error: Unexpected character `"'
2022-10-19 17:09:57 +02:00
Martijn van Beurden
3f4ba7620c Change C++ style comments to C style in headers 2022-09-20 19:54:32 +02:00
Martijn van Beurden
87c3d8a0d9 Fix a lot of Doxygen errors and add some documentation 2022-09-20 19:54:32 +02:00
Martijn van Beurden
89a1620c42 Update API and tool docs 2022-09-20 19:54:32 +02:00
Martijn van Beurden
dc12a9e2f6
Add struct tag to FLAC__StreamMetadata (#416) 2022-08-29 20:35:19 +02:00
Martijn van Beurden
707dace4bd Leave metadata items untouched if resize function fails 2022-08-20 16:03:53 +02:00
Martijn van Beurden
05ff569266 Finish porting guide 2022-07-27 22:16:04 +02:00
Martijn van Beurden
42201ae575 Add porting guide stub 2022-07-27 22:16:04 +02:00
Martijn van Beurden
10d7ce268b Bulk update copyright dates to 2022 2022-07-26 16:23:07 +02:00
Martijn van Beurden
633ab36ec5
Small fixes needed for 32-bit capability (#379)
* Change replaygain analysis so it is able to handle 32-bit PCM
* Increase FLAC__REFERENCE_CODEC_MAX_BITS_PER_SAMPLE to 32
* Fix switch-case fallthrough
2022-07-01 07:36:48 +02:00
Martijn van Beurden
9df24ac202 Add 32-bit decoding capability
Decoding for 32-bit files is added, including the ability to decode
a 33-bit side subframe. However, residuals are assumed to be limited
to a 32-bit signed int, the encoder must make sure of this
2022-06-12 18:38:21 +02:00
Martijn van Beurden
e5e99dcdc2
Simplify and merge win_utf8 files and remove from DLL interface
libFLAC DLLs were exposing windows_unicode_filename.h functions
because flac and metaflac needed to set flac_internal_set_utf8_
filenames. Files windows_unicode_filename.{c/h} and
win_utf8_io.[c/h] are merged, and all non-utf8 parts are removed.

With this commit, the libFLAC DLL interface is the same as the
libFLAC interface of shared libraries on other platforms
2022-05-17 22:05:45 +02:00
Martijn van Beurden
8b148b257e Rename FLAC__get_decoder_client_data to ...
... FLAC__stream_decoder_get_client_data. Also the function
definition was moved to its 'siblings'. This way, the function
fits better in the API with respect to naming.
2022-05-09 17:29:46 +02:00
Martijn van Beurden
b5f4a1535c Add API functions to limit minimum bitrate
Quite a lot of decoders have trouble streaming or seeking in a
file with frames that only consist of constant subframes because
of the large difference between the largest and smallest subframe.

To remedy this, this commit makes it possible to disable the use
of constant subframes for the last subframe in case all others are
constant with a new API function. This means the minimum bitrate
for a FLAC file encoded with this function used is raised to
1bit/sample (i.e. 48kbit/s for 48kHz material). This commit also
adds tests to the test suite
2022-05-02 07:59:01 +02:00
Martijn van Beurden
1ca7b38f3c Add FLAC__STREAM_DECODER_ERROR_STATUS_BAD_METADATA 2022-04-20 12:06:42 +02:00
Martijn van Beurden
b19ed90a5b
Remove api doc note untrue since commit c9c0d13
This has been untrue for almost 20 years now
2022-04-19 19:05:24 +02:00
Martijn van Beurden
7dd7f94822 Fix building both static and shared libs on MinGW with autotools
When building both static and shared libs on MinGW with autotools,
the build broke down without any error message. This commit makes
such a build work
2022-04-15 09:36:15 +02:00
Con Kolivas
24629435bb Add support in the encoder for up to 20 bit sample rates
Now that many DACs support up to 768kHz, add support for these
sample rates to the encoder. Files produced with these sample rates
are already decodable by the reference decoder. Update documentation
and tests accordingly.
2022-04-13 20:32:08 +02:00
NotTsunami
3bb5d8cd76 include: Escape number signs to suppress warnings
Doxygen sees '#' as a cross-reference, which this is not in this case. This will silence the following warning that pops up frequently when building with docs:

warning: explicit link request to 'defines' could not be resolved

The code shorthand tag was removed in include\FLAC\all.h to remain synonymous with other mentions of #define.
2019-11-19 16:14:47 +11:00
sezero
b917d456d2 make dllexport work with compilers other than MSVC
the issue is, flac and metaflac exes rely on flac_internal_???_utf8()
procedures from windows_unicode_filenames.c and there is no easy way
to exclude them from exports without breaking things. So export them
explicitly (they are exported anyway w/o this patch), but add a FIXME
note about the kludge in windows_unicode_filenames.c.
2019-10-10 18:30:39 +11:00
sezero
19a0e99ac3 move the new public get_decoder_client_data function to public header. 2019-10-10 06:09:21 +11:00
luz.paz
01eb19708c Fix miscellaneous typos.
Found via `codespell -q 3`
2018-05-24 07:20:19 +10: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
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
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
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
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
e4399a02ae Whitespace only
Patch-from: lvqcl <lvqcl.mail@gmail.com>
2015-12-25 09:39:34 +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
1437391577 Update copyright years to include 2014. 2014-11-25 13:04:30 +11: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
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
db1619d4f3 Underscore fixes.
* Replace _declspec with __declspec.
* Replace __wgetmainargs_ with __wgetmainargs_t and __wgetmainargs
  with wgetmainargs because identifiers with leading underscores are
  reserved for the compiler.

Patch-from: lvqcl <lvqcl.mail@gmail.com>
2014-06-28 09:17:32 +10:00
Erik de Castro Lopo
46bedb58d3 Update URLs as nedeed.
Sourceforge.net links updated as nedeed with some of them
being changed to point to xiph.org/flac.

Patch-from: lvqcl <lvqcl.mail@gmail.com>
2014-06-28 09:12:45 +10:00
Erik de Castro Lopo
3f5208c300 Fix clang compiler warnings.
These were most arising from -Wenum-conversion where an enum of
one type was being assigned to a variable on another.

Originally reported by Lenny Maiorani <lenny@colorado.edu> on the
flac-dev mailing list.
2014-04-09 18:09:03 +10:00
Erik de Castro Lopo
b1982fbc5f Set version to 1.3.0 and update coyprights throughout. 2013-05-26 19:17:53 +10:00