Commit Graph

3033 Commits

Author SHA1 Message Date
Arthur Taylor
f401000fd0 Skip format_check_test for asymmetric MPEG Layer I/II
libmpg123 supports decoding MPEG Layers I, II, and III, but we only have
encode support for Layer III. Skip checks for I and II as they don't
have write support.
2021-03-25 10:26:15 -07:00
Arthur Taylor
64ce116687 Fix command_test Subformat count 2021-03-25 10:26:15 -07:00
Arthur Taylor
30ba21d6c2 mpeg: Align decode log printing 2021-03-25 10:26:15 -07:00
Arthur Taylor
fe2ed77134 Add MPEG FORMAT to SF_COMMAND_*FORMAT, program common. 2021-03-25 10:26:15 -07:00
Arthur Taylor
163f725631 Rename mp3 -> mpeg (file sources and function names) 2021-03-25 10:26:15 -07:00
Arthur Taylor
dae19b9502 Rename SF_FORMAT_MP3 to SF_FORMAT_MPEG 2021-03-25 10:26:15 -07:00
Arthur Taylor
d2c836d732 Workaround vcpkg yasm issues.
See https://github.com/microsoft/vcpkg/pull/14003
2021-03-25 10:26:15 -07:00
Arthur Taylor
663a59aa6e mpeg: Add MPEG Encode, Decode and Tests
Use SF_FORMAT_MP3 major and SF_FORMAT_MPEG_LAYER_(I|II|III) subformats.
2021-03-25 10:26:15 -07:00
evpobr
be637260f7 xi: Remove extra blank lines 2021-03-24 08:17:54 +05:00
evpobr
bde4a1364e sfendian: Use C99 variable declarations 2021-03-22 12:39:52 +05:00
evpobr
4539826643 Update CHANGELOG.md 2021-03-19 11:33:49 +05:00
evpobr
1875f49bbf common: Allow to use C99 bool 2021-03-18 15:10:35 +05:00
evpobr
e85da03c6a common: Remove NOT macro 2021-03-18 14:36:35 +05:00
evpobr
d617fafe50 dwd: Use fixed width integer types 2021-03-18 13:55:50 +05:00
evpobr
b1d642078f sndfile: Improve SF_INFO correctness check
Limit maximum `samplerate` and `channels` values.

Update API documentation to reflect changes.

This should also fix some possible integer overflows as:

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28441

Credit to OSS-Fuzz.
2021-03-18 10:29:25 +05:00
evpobr
40fdc3121b common: Fix initialized va_list leaks
Thanks to clang-tidy.
2021-03-17 10:58:10 +05:00
evpobr
c0c81a5bde sndfile-to-text: Return proper error code 2021-03-16 18:56:26 +05:00
evpobr
8ff8ed6967 sndfile-to-text: Fix large stack allocation 2021-03-16 16:54:17 +05:00
evpobr
6fb0313563 sndfile-interleave: Fix large stack allocation 2021-03-16 16:30:07 +05:00
evpobr
19a4498736 sndfile-deinterleave: Fix resource cleanup 2021-03-16 16:30:07 +05:00
evpobr
9dee1e060b aiff: Fix typos 2021-03-15 16:02:16 +05:00
evpobr
dadf54b91e ci: Fix test failure 2021-03-14 22:08:01 +05:00
evpobr
e8293c29da pcm: Wrap CPU endian specific code in #ifdefs 2021-03-14 19:24:25 +05:00
brianlheim
61b5343584 sndfile.hh: add portability documentation 2021-03-07 22:37:23 +05:00
brianlheim
1c48ce31f6 sndfile.hh: use nullptr when available 2021-03-07 22:37:23 +05:00
brianlheim
b46de402d5 Revert "Fix zero-as-null-pointer-constant-warning"
This reverts commit 2269af8417.

The code which defined nullptr mysteriously broke the Windows build for
SuperCollider. After some investigation I discovered this commit to be the
cause, as MSVC by default does not set __cplusplus to anything greater
than 199711L unless explicitly asked to.

In general, #defining a keyword like nullptr in a library header is not
courteous, as it can affect compilation of later code and cause
significant confusion. This was exactly the situation I encountered, and
it took several days to track down the source.

The stated reason for the commit reverted by this was to prevent a
specific warning from appearing during compilation. However, there are
a few less intrusive ways of accomplishing this. For example, by using
`#pragma`s offered by all major compilers which temporarily disable
warnings, or by including headers with `-isystem` or any similar
mechanism which disables warnings from "system" headers. For code which
is intended to support C++98 and newer standards, preventing all
compilers from emitting any warnings is a losing battle. It is easier
in my view for consuming code to handle this as it needs to.

There are several options here for resolving this. I could just fix my
project, but that would not prevent others from encountering the same
issue. I could try for a clever-er version of this using a macro not
named nullptr and an additional check for MSVC, but this seems to offer
diminishing returns considering how easily any warnings about NULL can
be silenced, and carries the risk of introducing new and unforeseen
problems. So, I have here simply reverted the commit so the code uses
NULL once again.
2021-03-07 22:37:23 +05:00
evpobr
9b398f0101 Merge branch 'master' of https://github.com/libsndfile/libsndfile 2021-03-07 11:37:23 +05:00
evpobr
5645fa8ee8 ci: Speed up Autotools tests
We run them twice.
2021-03-07 11:37:19 +05:00
evpobr
97f9e64b39 sfendian: Fix byteswap optimizations detection 2021-03-07 11:35:42 +05:00
evpobr
6dee7120ab sndfile-salvage: Handle files > 4 GB on Windows OS 2021-03-06 21:44:33 +05:00
evpobr
36c5198d91 common: Fix regression after 4ff3b84 2021-03-06 12:00:31 +05:00
evpobr
61bcb5e979 Fix previous commit 2021-03-06 11:54:08 +05:00
evpobr
4ff3b84eff msvc: Fix annoying conversion warnings #304 2021-03-06 11:41:47 +05:00
evpobr
1578687eb3 common: Move psf_isprint() to source file 2021-03-05 12:02:01 +05:00
evpobr
6477f6cd83 common: Move psf_memdup() to source file 2021-03-05 12:00:54 +05:00
evpobr
db41920b6d common: Move psf_strlcat() and psf_strlcpy() to source file 2021-03-05 11:50:17 +05:00
evpobr
6d77865775 common: Remove unused fourcc_to_marker() function 2021-03-05 11:43:08 +05:00
evpobr
3b8e3ef807 sndfile-deinterleave: Fix large stack allocation 2021-03-04 20:28:58 +05:00
evpobr
bd2f8226d9 chunk: Fix NULL pointer dereferencings 2021-03-04 20:20:52 +05:00
evpobr
bea8fa5d0e common: Fix NULL pointer dereferencing 2021-03-04 20:16:24 +05:00
evpobr
490dcc642f wav: Use proper format specifiers 2021-03-04 20:13:34 +05:00
evpobr
8b31aea3fb sfendian: Fix possible arithmetic overflows 2021-03-04 20:10:40 +05:00
evpobr
96755fa3e5 alac: Fix unitialized value 2021-02-25 13:05:12 +05:00
evpobr
b20886b7ab test_file_io: Use proper format specifiers 2021-02-25 13:02:30 +05:00
evpobr
3078185b6a common: Fix undefined behaviour 2021-02-25 12:58:11 +05:00
evpobr
cab39856af broadcast: Use proper format specifiers 2021-02-25 12:51:30 +05:00
evpobr
c29a002749 sndfile-info: Use proper format specifiers 2021-02-25 12:47:27 +05:00
evpobr
f44d0988e4 alac: Fix NULL pointer dereferencing 2021-02-25 12:41:02 +05:00
evpobr
7e6cc7cb19 ima_adpcm: Fix unitialized value 2021-02-25 12:38:12 +05:00
evpobr
a53048792a alac: Use proper format specifiers 2021-02-25 12:36:35 +05:00