Commit Graph

2890 Commits

Author SHA1 Message Date
evpobr
2bc2d4e4dc CMake: Fix ENABLE_CPACK option
Closes #544
2020-08-18 11:12:56 +05:00
evpobr
55135313d4 Revert "src/pcm.c: Add const to some function parameters"
This reverts commit a748bea5f2.
2020-08-18 09:40:15 +05:00
evpobr
a748bea5f2 src/pcm.c: Add const to some function parameters 2020-08-18 09:05:27 +05:00
evpobr
ccb75f4829 Version 1.0.29 2020-08-15 10:50:52 +05:00
evpobr
9ab0965e88 src/sndfile.h.in: Fix sf_command() description
Closes #540.
2020-08-11 08:41:51 +05:00
evpobr
af49a5021c CMake fixes
* Set static runtime by default for MinGW

  Autotools does the same. Also fixes bug - compiler flags for MinGW were
  cleared by when ENABLE_STATIC_RUNTIME is OFF (default).

  Also ENABLE_STATIC_RUNTIME option disabled for MinGW.

* Better CMake policies handling
* Add SndFile::sndfile alias library
* Don not add programs to package config-file
* Update README.md
* Fix generator expression with src/version-metadata.rc
2020-08-04 15:59:22 +05:00
Nick Henderson
676eb28fc2 README.md: Fix the brew install command
'opus' is the name of the Homebrew package for the
Opus codec.
2020-08-03 20:55:51 +05:00
evpobr
73e09a1705 CMake: Fix Vorbis dependency handling
* Fix Vorbis not found for CMake < 3.17 (closes #530)
* Update FindVorbis module documentation
* Remove unused VorbisEnc.cmake
* Fix bug in SndFileConfig.cmake.in
2020-08-02 16:13:38 +05:00
evpobr
7a8149a723 Azure Pipelines CI: Update images 2020-08-02 16:11:11 +05:00
Fabian Greffrath
2ccb23fe72 sfe_copy_data_fp: check value of "max" variable for being normal
and check elements of the data[] array for being finite.

Both checks use functions provided by the <math.h> header as declared
by the C99 standard.

Fixes #317
CVE-2017-14245
CVE-2017-14246
2020-06-20 18:18:11 +10:00
Erik de Castro Lopo
422b29c06d src/sd2.c: Fix parsing of some SD2 files
Exit early when Photoshop file is detected.

Closes: https://github.com/erikd/libsndfile/issues/526
2020-06-20 13:45:13 +10:00
Erik de Castro Lopo
de7d60fe6e src/wavlike.c: Fix compiler warning
Closes: https://github.com/erikd/libsndfile/issues/527
2020-06-20 13:45:13 +10:00
Max Smolens
808fb07864 CMake: Fix Package Configuration file when ENABLE_EXTERNAL_LIBS is OFF
When libsndfile is configured with ENABLE_EXTERNAL_LIBS=OFF, the CMake
Package Configuration file shouldn't look for the external libraries.
Otherwise, the return() call in the find_dependency() macro causes
find_package(SndFile) to fail if the libraries are not found.

Furthermore, the find_dependency() calls are necessary only when
BUILD_SHARED_LIBS=OFF. In other scenarios, the external libraries aren't
linked by client projects.
2020-06-19 20:58:00 +10:00
evpobr
06ebde50e3 CMake fixes
* Update Vorbis targets to match upstream
* Better dependency handling with Vcpkg
* Fix dev warning with SQLite3
2020-04-12 16:20:04 +10:00
evpobr
a1fa15ff44 cmake: Bump version to 1.0.29pre2 2020-04-07 18:54:45 +10:00
Nicolas Imbard
e1afeec6e8 opus: Allow setting of OGG page latency
Latency is set via 'sf_command' using 'SFC_SET_OGG_PAGE_LATENCY_MS'.
Max average latency set at 1600ms, min average latency set at 50ms.
Default latency set at 1000ms.

Closes: https://github.com/erikd/libsndfile/pull/512
2020-04-05 20:07:01 +10:00
Arthur Taylor
65e13303ae sndfile-convert: Handle gsm, vox and opus extensions the same way
Closes: https://github.com/erikd/libsndfile/pull/498
2020-04-05 20:07:01 +10:00
Leland Lucius
bbe1975e1f Fix IMA-ADPCM encoding for AIFF files
Closes: https://github.com/erikd/libsndfile/pull/516
2020-04-05 20:07:01 +10:00
Dragos Oancea
49b7d619a8 src/ima_adpcm.c: Fix ASAN crash in wavlike_ima_seek()
ASAN says: "pc points to the zero page"

Closes: https://github.com/erikd/libsndfile/pull/507
2020-04-05 20:07:01 +10:00
Kevin Calhoun
7695e5b3f3 Wave64: Permit and skip arbitrary chunks prior to the data chunk
Closes: https://github.com/erikd/libsndfile/pull/509
2020-04-05 18:28:14 +10:00
evpobr
4bdd741460 azure-pipelines.yml: Add Opus dependency 2020-03-08 17:35:14 +11:00
evpobr
e6909192ce CMake improvements
* Fix Ogg and Opus imported targets
* Better SndFileConfig.cmake module with dependency checks
* Fix config-file package installation directory
* Prefer config-file package mode for Windows CI builds
* Update README.md
* Allow CMAKE_MSVC_RUNTIME_LIBRARY option to set MSVC ABI
* Fix some bugs in FindFLAC.cmake (closes #505)
2020-03-08 17:34:27 +11:00
Jean Pierre Cimalando
a7e9fb5f7c List pkgconfig dependencies in Requires.private 2020-03-08 13:02:42 +11:00
Henner Zeller
d397671809 Add libopus to the build-dependency requirements in READMEs. 2019-11-10 09:37:00 +11:00
evpobr
97a361afc2 README.md: Fix information about CMake builds
Closes #494.
2019-10-24 18:32:01 +11:00
Naji Mammeri
ae64caf9b5 Fix building programs while BUILD_SHARED_LIBS=ON 2019-10-13 08:54:20 +11:00
evpobr
be5a7ccee3 CMake: fix default install directory on Windows
Closes #486.
2019-09-17 06:21:32 +10:00
Moonbase59
3a57ea117b Add BWF v2 loudness parameters
Closes: https://github.com/erikd/libsndfile/issues/479
2019-08-27 07:28:25 +10:00
evpobr
22c2fa64c2 tests/command_test.c: Fix format specifiers
Closes: #472
2019-07-02 20:59:35 +10:00
Erik de Castro Lopo
6978654319 configure.ac: 1.0.29rc2 2019-06-13 19:19:10 +10:00
Martin Delille
2269af8417 Fix zero-as-null-pointer-constant-warning 2019-06-12 07:18:30 +10:00
Erik de Castro Lopo
25824cb914 sndfile-convert: Close input file on output format error 2019-04-22 02:48:50 +10:00
Erik de Castro Lopo
df55170ce4 sndfile-convert: Fix conversion to/from Opus 2019-04-22 02:48:50 +10:00
Erik de Castro Lopo
a3a4d7a089 opus: Fix issues found using fuzzing 2019-04-22 02:48:50 +10:00
David Seifert
d5531723a0 Ignore -Wformat-truncation warnings
* These are spurious and pollute logs unnecessarily.
2019-04-08 11:06:01 +10:00
Matti Lehtimäki
a6866b8716 CMake: Fix installation of man pages. 2019-03-29 11:31:26 +05:00
Erik de Castro Lopo
5056a77fda Scripts/static-deps-build.mk : Better fuzzing support
The git version of libogg has a `--disable-crc` configure option which is
useful/necessary when fuzz testing. However, disabling libogg CRC is highly
undesirable when not fuzz testing so both need to be supported.

Also add configure script option checking.
2019-03-08 17:57:37 +11:00
Emilio Pozuelo Monfort
6d7ce94c02 wav_write_header: don't read past the array end
If loop_count is bigger than the array, truncate it to the array
length (and not to 32k).

CVE-2019-3832
2019-03-07 16:47:46 +11:00
Erik de Castro Lopo
7c5da26b70 static-deps-build.mk: Add opus to build 2019-02-26 20:22:14 +11:00
Erik de Castro Lopo
238ee50429 programs/sndfile-convert.c: Add -opus option 2019-02-23 18:30:02 +11:00
Arthur Taylor
bc82928504 Vorbis: Clean up calculation of datalength 2019-02-22 17:59:53 +11:00
Arthur Taylor
ea87e01ca2 Vorbis: Use new ogg functions, add bisection seek support. 2019-02-22 17:59:53 +11:00
Arthur Taylor
326e4533f3 Opus file support
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.
2019-02-20 19:30:30 +11:00
Erik de Castro Lopo
1a87c443fe Avoid two static analysis warnings
Neither of these issues was of any concern, but they have been fixed to
avoid the static analysis warnings.

Closes: https://github.com/erikd/libsndfile/issues/445
2019-02-07 16:56:01 +11:00
evpobr
300375ecb8 Integrate Azure Pipelines CI 2019-02-04 06:38:19 +11:00
evpobr
71661c4f19 CMake: Fix warnings on MinGW platform
Fixes warning: `"__USE_MINGW_ANSI_STDIO" redefined`.

`__USE_MINGW_ANSI_STDIO` is required to use 64-bit numbers in
    printf-like functions.
2019-02-01 07:45:29 +11:00
evpobr
578e470ffa src/file_io.c: Use modern WinAPI functions 2019-01-30 16:05:10 +11:00
evpobr
f30432f0ef src/wavlikie.h: Fix EXT_SUBFORMAT struct
According to MSDN all the GUID fields are unsigned.

Fixes -Woverflow warnings in pedantic mode.
2019-01-29 14:21:28 +11:00
evpobr
58c6458140 src/file_io.c: Use CreateFileA for ANSI path
With `_UNICODE`defined `CreateFile` is expanded to unicode `CreateFileW` instead of ANSI `CreateFileA`.

Thanks @aholzinger

Closes: #442
2019-01-10 19:37:21 +11:00
Marcel Waldvogel
c11deaa04e Do not require seek ops on non-seekable files 2019-01-03 15:23:11 +11:00