Ogg: Introduce new functions ogg_sync_fseek(), ogg_ftell(), ogg_next_page(),
ogg_stream_next_page(), ogg_sync_last_page_before(), and
ogg_stream_unpack_page(). Use ogg_sync_* for ogg_read_first_page(). Bump libogg
version requirement from 1.1.3 to 1.3.0 as LibOgg 1.3.0 is required for
ogg_stream_pageout_fill() and ogg_stream_flush_fill().
Opus: Add opus support. Document added commands
SFC_(GET|SET)_ORIGINAL_SAMPLERATE. Added or extended tests ogg_opus_test,
compression_size_test, floating_point_test, lossy_comp_test, string_test,
external_libs_test. Change Opus to non-experimental.
While experimenting, determined that Vobis' analysis stops working on
non-normalized floating point input outside the range of [2000.0, -2000.0], and
seems to get worse the larger the magnitude. As the sdlcomp_test_float and
sldcomp_test_double tests work with non-normalized floats with a magnitude of
32000.0, this explains why they do not work for Vorbis.
This patch fixes the test by reducing the magnitude of the test data at encode
and restoring it at decode if it detects Vorbis, mantaining the same 32000.0
overall magnitude so the envelope values for the test are the same as they are
for other tests and format.
It is unknown at this time if the input range magnitude of 2000.0 is a
limitation of Vorbis or libvorbis.
Fix parsing of instrument fine tuning instrument field. There is still
a possible rounding error involved which might require further
investigation at some stage.
Update the test as well.
Currently, libsndfile requires in-tree bootstrapping and creation
of the tarball. For Gentoo, some users might want to build the
latest git checkout. This commit makes out-of-tree building of all
the necessary dependencies possible.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Explicitly writing the header with SFC_UPDATE_HEADER_NOW before
the first sf_write() was making sf_write() calls fail. This is a
test to verify that the fix works.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
This code had egregious errors in the way things were being passed
to psf_binheader_writef and neither the compiler nor the tests
caught it. It was however found when adding safety macros to enforce
correct type being passed to psf_binheader_writef.
* tests/pedantic-header-test.sh.in:
Commit 58737ceb48 started using "sfconfig.h" in the test files,
which made this test script fail.
* .travis.yaml:
Add `distcheck` that so PRs are checked.
For some formats (like FLAC) the headers are written *just* before
the first bit of audio data. Until now, there was not check for that
the header write function returned zero.
Test included.
It's more preferable to generate the testsuite when running 'make dist'
or 'make distcheck' instead of running it from the configure script.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Windows doesn't have `truncate` and since it was only being used
to truncate the file to zero length, implement a cross platform
`truncate_file_to_zero`.
Based on an idea from <evpobr@gmail.com>.