Erik de Castro Lopo
dc56b25f41
tests/error_test.c: Add unrecognised file test
2018-03-17 13:05:25 +11:00
evpobr
4a59daf7e7
src/aiff.c: fix unnecessary variable assignment
2018-03-16 08:23:04 +11:00
Johan Vromans
65eabcbf71
src/wav.c: Fix skipping of erroneous subchunks
...
Closes: https://github.com/erikd/libsndfile/issues/370
2018-03-15 09:29:19 +11:00
evpobr
a34dc27739
CMake: Add test case for NMS_ADPCM in WAV file
...
Related to #361 .
2018-03-10 15:46:51 +05:00
Erik de Castro Lopo
6f3266277b
Fix max channel count bug
...
The code was allowing files to be written with a channel count of exactly
`SF_MAX_CHANNELS` but was failing to read some file formats with the same
channel count.
2018-03-08 19:23:04 +11:00
Arthur Taylor
4043ec289f
lossy_comp_test: Add tests for NMS_ADPCM in WAV files.
2018-03-08 18:13:03 +11:00
Arthur Taylor
33f0d0658a
wav.c: Specify widths of header members for NMS_VBXADPCM
2018-03-08 18:13:03 +11:00
Arthur Taylor
6239927a11
Support NMS_ADPCM subformats with major format WAVE
2018-03-08 18:13:03 +11:00
Arthur Taylor
89da46f168
wav: Add support for WAVE_FORMAT_NMS_VBXADPCM
...
Found a set of NMS ADPCM wav files to verify.
2018-03-08 18:13:03 +11:00
Arthur Taylor
64e5a3f182
Add NMS ADPCM codec implementation and support
...
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2018-02-03 19:44:33 +11:00
evpobr
871ecd7f70
src/sndfile.c: Set SFC_GET_LIB_VERSION return result to 0 on error
...
If data == NULL string is not copied but command returns SFE_BAD_COMMAND_PARAM (31). It can be misunsderstood as string length.
2018-02-03 16:23:23 +11:00
Jonathan Wakely
2241075e47
sndfile-convert: Check if conversion failed due to no. of channels
...
This fixes the problem noted in #43 where attempting to convert a stereo
WAV to SDS gives a misleading error about the codec, when the real problem
is that the output format only supports mono not stereo.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2018-02-03 16:12:42 +11:00
Jonathan Wakely
40d3e412e0
Fix spelling
2018-02-03 13:17:04 +11:00
Jan Starý
2acea2723a
sndfile-play: Remove BEOS support
...
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2018-02-03 13:10:10 +11:00
Jan Starý
e6b473ed8e
drop MacOSX from sndfile-play
...
We don't play on MacOSX >= 10.8 (the code for the new API is not written),
and support for MacOSX older than that was removed some time ago.
So drop the last remnants; we just don't play on MacOSX.
2018-02-03 12:54:50 +11:00
Erik de Castro Lopo
adc0d425f9
configure.ac: Report whether building Octave interface
2018-01-07 12:14:46 +11:00
Jan Starý
38f1214117
unbreak sed(1) in pre-commit
...
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2018-01-07 11:53:48 +11:00
Jan Starý
d1c591aea2
configure.ac: Fix --enable-octave doc string
...
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2018-01-07 11:50:52 +11:00
Erik de Castro Lopo
6b0df6060c
sndfile.c: Return the length of log output
...
There were two handers for SFC_GET_LOG_INFO and one incorrectly was
not returning the length of log string.
Closes: https://github.com/erikd/libsndfile/issues/345
2017-12-13 18:54:31 +11:00
David Honour
d252bec831
Simplify psf_fseek logic
...
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2017-11-26 16:26:40 +11:00
David Honour
24075a649a
Add test to reproduce seeking with fileoffset bugs
...
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2017-11-26 16:24:30 +11:00
evpobr
826d5296da
Add AppVeyor CI script
2017-10-31 19:30:54 +11:00
Erik de Castro Lopo
5d4d1feca0
Remove redundant libsndfile.def.in
2017-10-31 18:42:40 +11:00
Erik de Castro Lopo
af9d26411b
Scripts/build-test-tarball.mk.in: Updates
2017-10-28 16:17:55 +11:00
Erik de Castro Lopo
dfe09db021
Makefile.am: Resurect test-tarball target
2017-10-28 12:55:50 +11:00
Erik de Castro Lopo
ac5b66a447
configure.ac: Add -mstackrealign to CFLAGS for mingw*
2017-10-27 19:35:21 +11:00
Erik de Castro Lopo
9b4fdaccc1
tests/header_test.tpl: Fix a memory leak
...
Found using AddressSanitizer.
2017-10-26 19:21:06 +11:00
evpobr
fa92cc4b88
src/sfconfig.h: Fix CPU architecture detection under Windows
2017-10-21 18:35:45 +11:00
evpobr
d356f3f292
src/sfendian.h: Detect and use MSVC byte swap intrinsics
2017-10-21 18:34:48 +11:00
Erik de Castro Lopo
e02f64cd98
Fix travis OSX build
2017-10-14 21:24:29 +11:00
Erik de Castro Lopo
203096325d
programs/sndfile-convert.c: Add -float64 conversion
2017-10-14 20:54:56 +11:00
David Seifert
b17f14d613
Make git checkout buildable out-of-tree
...
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>
2017-10-08 18:23:58 +11:00
Derek Gasaway
2c2d9a8eb2
Remove unused internal headers from examples.
2017-10-02 10:26:32 +11:00
Erik de Castro Lopo
cc5e831a75
A couple of minor cstyle fixes
2017-10-01 16:33:41 +11:00
Erik de Castro Lopo
c00b785fbd
Scripts/cstyle.py: Add some new rules
2017-10-01 16:33:29 +11:00
Ghabry
3f8d728f01
configure.ac: Fix configure for vitasdk
...
Closes: https://github.com/erikd/libsndfile/issues/310
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2017-09-30 20:28:14 +10:00
Ghabry
45fb22f52e
Replace custom definitions of int16_t etc with <stdint.h> versions
...
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2017-09-30 20:26:01 +10:00
Ghabry
df6c86efaa
src/wavlik.h: Fix function protype/definition mismatch
...
For functions `wavlike_read_bext_chunk` and `wavlike_read_cart_chunk`.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2017-09-30 20:24:41 +10:00
Fabian Greffrath
85c877d507
double64_init: Check psf->sf.channels against upper bound
...
This prevents division by zero later in the code.
While the trivial case to catch this (i.e. sf.channels < 1) has already
been covered, a crafted file may report a number of channels that is
so high (i.e. > INT_MAX/sizeof(double)) that it "somehow" gets
miscalculated to zero (if this makes sense) in the determination of the
blockwidth. Since we only support a limited number of channels anyway,
make sure to check here as well.
CVE-2017-14634
Closes: https://github.com/erikd/libsndfile/issues/318
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2017-09-30 20:16:11 +10:00
David Honour
ef888c6fae
FLAC: Fix inconsistent indentation
...
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2017-09-28 10:42:36 +10:00
David Honour
71444146ae
Fix typo in macro name
2017-09-26 19:47:49 +10:00
Johannes Kroll
b9e544328e
FLAC: fix clipping of negative values
...
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2017-09-26 19:43:45 +10:00
David Seifert
e6c42ff027
Make build system completely non-recursive
2017-09-26 19:35:56 +10:00
Erik de Castro Lopo
beee21e5c2
Revert "tests/Makefile.am: Switch away from GNU make rules"
...
This reverts commit ff26310437
.
The GNU make rules actually work. The old style suffix rules do not.
2017-08-10 20:22:18 +10:00
Henner Zeller
f96e5a2047
Add test for flac regression update-header-before-write
...
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>
2017-08-10 20:09:55 +10:00
Henner Zeller
a81308ee40
Make sure FLAC__stream_encoder_init_stream() is only called once.
...
The FLAC__stream_encoder_init_stream() function complains if it is
called multiple times. If we happen to have flushed the header
manually before with sf_command(snd, SFC_UPDATE_HEADER_NOW, ...),
then all subsequent sf_write...() functions fail otherwise because
they attempt to write the header again.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2017-08-10 20:09:05 +10:00
Erik de Castro Lopo
2658c5f9b0
sfendian.h: Simplify CPP logic
2017-08-10 07:04:11 +10:00
Erik de Castro Lopo
af4890ca63
Fix x86/x86_64 CPU detection regression
...
Regression introduced in commit 8321896
.
Reported by Anonymous Maarten.
Closes: https://github.com/erikd/libsndfile/pull/306
2017-08-10 07:04:11 +10:00
Erik de Castro Lopo
fa1d42fddd
src/sndfile.c: Remove un-needed memset before free
...
Closes: https://github.com/erikd/libsndfile/issues/302
2017-07-29 12:08:10 +10:00
Erik de Castro Lopo
e6a1749832
sndfile-deinterleave.c: Check for errors in path handling
...
Closes: https://github.com/erikd/libsndfile/issues/301
2017-07-29 12:08:10 +10:00