Commit Graph

20 Commits

Author SHA1 Message Date
huang-jianfei200
297f533a38 Version upgrade! Merge branch 'dev'
Signed-off-by: huang-jianfei200 <huangjianfei4@huawei.com>
2023-11-15 20:02:12 +08:00
Jörn Heusipp
3bd5048f8c Define SF_COUNT_MAX as INT64_MAX.
INT64_MAX instead of 0x7FFFFFFFFFFFFFFFLL avoids type discrepancy between int64_t and LL (long long) suffix when int64_t is not long long.
2022-09-12 18:54:29 +02:00
Jörn Heusipp
bd951f9a47 Make sndfile.h independent of build system variables
Fixes <https://github.com/libsndfile/libsndfile/issues/868>.
2022-09-12 10:39:37 +02:00
Arthur Taylor
bbe95850d9 sndfile.h: Fix accidental command enum reuse for GET_OGG_STERAM_SERIALNO 2022-04-11 12:16:03 -07:00
Arthur Taylor
3aab1c5617 ogg: Add command SFC_GET_OGG_STREAM_SERIALNO
Add command SFC_GET_OGG_STREAM_SERIALNO returning the current stream
serialno. Useful for debugging.
2022-04-11 12:16:03 -07:00
sulav
18d4e01599 move libsnd files from audio_standard to third_party folder
Signed-off-by: sulav <sulav.mulmi@huawei.com>
2021-08-04 20:58:48 +05:30
evpobr
dc1c8c2492 sndfile.h: Fix (really) get/set bitrate commands values 2021-07-17 09:48:43 +05:00
evpobr
3ef35eea25 sndfile.h: Fix get/set bitrate commands values
Numeric values of SFC_GET_BITRATE_MODE and SFC_SET_BITRATE_MODE commands
matched the values ​​of commands SFC_SET_OGG_PAGE_LATENCY_MS and
SFC_SET_OGG_PAGE_LATENCY.
2021-07-09 14:38:24 +05:00
Arthur Taylor
dae19b9502 Rename SF_FORMAT_MP3 to SF_FORMAT_MPEG 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
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
d11a64c7c4 Deprecate ENABLE_SNDFILE_WINDOWS_PROTOTYPES define
Use standard `_WIN32` define instead. Any sane compiler on Windows
platfrom defines `_WIN32`.

The `wpath` parameter type has been changed to an equivalent type that
does not require the inclusion of the `windows.h` header.
2021-02-18 16:56:34 +05:00
evpobr
2db6a8fd2e Change SNDFILE type to be a typedef of a real struct
For developers it is typedef to the actual `sf_private_tag` struct now.

For users it is still opaque type (no API break).
2021-02-14 18:34:16 +05:00
SmiVan
5cb3faf69b Marked unimplemented dither enums in the header file as such. 2021-01-24 21:47:57 +05:00
evpobr
4a253ba0dc Update documentaton links 2020-10-05 12:21:19 +05:00
evpobr
317a16a12f src/sndfile.h.in: SF_COUNT_MAX define tweaks
* Drop special condition for VC <= 2003
* Fix SF_COUNT_MAX redefine in config.h
2020-09-10 13:23:39 +05:00
Gisle Vanem
fe9971fa28 [Win32] Fix for MSVC
* A `_MSCVER` ha never been a built-in for the MSVC compiler.
* Simply use the same `SF_COUNT_MAX` for all MSVC compilers.
2020-09-10 12:22:51 +05:00
evpobr
acfcd147da Move public headers to include directory 2020-08-26 11:59:26 +05:00