Commit Graph

2568 Commits

Author SHA1 Message Date
David Seifert
ae6a26c8d4 Replace AC_HELP_STRING by AS_HELP_STRING
AC_HELP_STRING has been deprecated years ago.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2017-01-28 21:16:21 +11:00
David Seifert
947af45028 Compile 'sndfile-regtest' only when sqlite3 is available
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2017-01-28 21:16:21 +11:00
David Seifert
e57927bea8 Compile tests only when running 'make check'
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2017-01-28 21:16:21 +11:00
David Seifert
f5ccb0a6ec Remove 'INSTALL' file, as it is part of the cruft automake installs always
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2017-01-28 21:16:21 +11:00
Erik de Castro Lopo
4a171f8f5f tests/write_read_test.tpl: One more check 2016-12-11 20:14:57 +11:00
Erik de Castro Lopo
640a516c3d src/sndfile.c: Improve validation in sf_read/write_* 2016-12-07 22:05:10 +11:00
Erik de Castro Lopo
acaa880036 src/flac.c: Cleanup and validation improvements 2016-12-07 20:44:05 +11:00
Erik de Castro Lopo
144ccafba6 src/windows.c: Fix sf_wchar_open
This got broken in the recent change to a dynamically sized header
buffer.
2016-12-02 21:30:25 +11:00
Erik de Castro Lopo
2c43f39841 src/test_binheader_writef.c: Initialize sf_private
Without this initialization, this test program was crashing on
OS X. For some reason, it was fine on Linux.
2016-11-28 21:25:13 +11:00
Erik de Castro Lopo
0818c1685e tests/chunk_test.c: Add test for large free chunks 2016-11-27 20:02:06 +11:00
Erik de Castro Lopo
a51f5afbf1 Scripts/static-deps-build.mk: Restore file
This was deleting because it was thought to be un-needed when in fact
it is used when fuzzing with American Fuzzy Lop.
2016-11-27 18:02:44 +11:00
Erik de Castro Lopo
681831a404 src/ : Follow changes to header buffer
Closes: https://github.com/erikd/libsndfile/issues/191
2016-11-27 16:36:44 +11:00
Erik de Castro Lopo
708e996c87 src/ : Move to a variable length header buffer
Previously, the `psf->header` buffer was a fixed length specified by
`SF_HEADER_LEN` which was set to `12292`. This was problematic for
two reasons; this value was un-necessarily large for the majority
of files and too small for some others.

Now the size of the header buffer starts at 256 bytes and grows as
necessary up to a maximum of 100k.
2016-11-27 16:17:06 +11:00
Erik de Castro Lopo
47d1b09925 src/sd2.c: Reimplement header write
Use `psf_binheader_writef`.
2016-11-25 22:43:07 +11:00
Erik de Castro Lopo
50920d61d9 src/common.c: Improve error checking 2016-11-25 21:54:27 +11:00
Erik de Castro Lopo
e6618f7bfd src/test_main.c: Fix for Windows
For Windows, libsndfile uses the 64 bit only file I/O APIs.
2016-11-14 20:07:55 +11:00
Erik de Castro Lopo
e4572180c3 configure.ac: Fix detection of Large File Support
Support for files over 2 gigabytes has been broken for some time on
32 bit systems and no one noticed.
2016-11-14 08:28:44 +11:00
Erik de Castro Lopo
d92d86cc3f src/test_main.c: Add a test for 64 bit file offsets
Basically just a sanity check that Large File Support is enabled on
32 bit systems.
2016-11-14 08:28:42 +11:00
Erik de Castro Lopo
798edec4e6 autogen.sh: Only add hook if .git exists 2016-11-14 05:54:15 +11:00
Erik de Castro Lopo
1d7b55b483 tests/chunk_test.c: Add wav_subchunk_test 2016-11-09 06:46:07 +11:00
Erik de Castro Lopo
9e68fec2fa sfendian.h: Add H2LE_16/H2LE_32 for little endian hosts 2016-11-09 06:46:02 +11:00
Erik de Castro Lopo
5c1efe1c63 wavlike.c: Fix subchunk parsing bug
The function `wavlike_subchunk_parse` was failing to parse files with
a `LIST` chunk containing an `adtl` chunk that was bigger than a
statically sized buffer.

Closes: https://github.com/erikd/libsndfile/issues/167
2016-11-09 06:46:02 +11:00
Erik de Castro Lopo
85795db0ab Delete doc/dither.html
Dither has not yet been implemented and the file was a copy of an
obsolete version of doc/command.html.
2016-11-08 06:50:46 +11:00
IOhannes m zmölnig
f9a3fab6aa examples/sndfile-to-text: added '--full-precision' flag
Specifying this flag will store the samples in full precision
(so they can be losslessly restored from the text-file).

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Closes: https://github.com/erikd/libsndfile/pull/186
2016-10-13 19:44:46 +11:00
Erik de Castro Lopo
2c4ebd959f Further improvements to create_symbols_file 2016-10-13 18:58:24 +11:00
Erik de Castro Lopo
c59d99b06f src/Makefile.am: Add dependencies for Symbols files 2016-10-12 21:21:30 +11:00
Erik de Castro Lopo
ae272b59c0 Reimplement create_symbols_file in C
Apparently the need for Python makes libsndfile difficult to build
on Windows, so re-implement this program in C.
2016-10-11 19:46:51 +11:00
Erik de Castro Lopo
2fcf531ac9 src/alac.c: Remove large stack allocations
When compiled with MSVC, this code would fail because the
`byte_buffer` arrays on the stack were too large. Put them in
the heap allocated `ALAC_PRIVATE` struct instead.

Closes: https://github.com/erikd/libsndfile/issues/164
2016-09-14 18:00:13 +10:00
Erik de Castro Lopo
b5bc6631f8 src/aiff.c: Fix compiler warning
Don't try to shift a 32 bit value by more than 32 bits.
2016-09-12 19:40:03 +10:00
evpobr
2f699cf96c sndfile.h: Select MSVC version when defining SF_COUNT_MAX
Later versions of MSVC have bothing `long long` and the `LL`
specifier.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Closes: https://github.com/erikd/libsndfile/issues/155
2016-09-12 17:21:14 +10:00
Erik de Castro Lopo
a547d06726 Revert "configure.ac: Fix out-of-tree builds"
This reverts commit 1015973005
because that commit messes up 'make distcheck'.
2016-09-11 09:02:27 +10:00
Erik de Castro Lopo
1015973005 configure.ac: Fix out-of-tree builds
The link stage was looking for the Symbol.* files in the source
tree rather than the build tree.
2016-09-11 08:23:40 +10:00
Erik de Castro Lopo
08dfe89c61 tests: Remove need for POSIX truncate function
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>.
2016-09-09 19:15:42 +10:00
evpobr
cd0332c026 Use INT64_C macro if available
If stdint.h header is available, use standard INT64_C macro to
declare 64-bit integer constants.

This makes code more portable.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Closes: https://github.com/erikd/libsndfile/pull/148
2016-09-09 19:01:52 +10:00
Erik de Castro Lopo
cf30d2d529 Don't force 'unsigned char'
The configure script had been forcing `-funsigned-char` which is not
supported by some compilers like Sun Studio.

Fixup one test which was failing on Sun Studio due to differences in
how that compiler handles undefined behaviour around assigning an
unsigned char value to a signed char.
2016-09-06 18:19:46 +10:00
evpobr
9705236451 Add .gitattributes file
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Closes: https://github.com/erikd/libsndfile/pull/144
2016-09-06 18:17:43 +10:00
evpobr
fdf75785dc configure.ac: Better checking for ssize_t
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Closes: https://github.com/erikd/libsndfile/pull/142
2016-09-03 20:39:29 +10:00
Erik de Castro Lopo
d576914d8d configure.ac: Add -Wvla to CFLAGS
Want to warn about usage of Variable Length Arrays so they aren't
added by mistake.
2016-09-03 18:12:19 +10:00
Erik de Castro Lopo
ba352a1ce7 Remove all use of Variable Length Arrays
VLAs are somewhat unsound and are being made an optional part of ISO
C specification.
2016-09-03 18:11:56 +10:00
Erik de Castro Lopo
f405bdab07 src/aiff.c: Refactoring
Main aim was to reduce the usage of Variable Length Arrays (VLAs) which
were being use to write Pascal strings to the AIFF header. Since
`psf_binheader_writef` now supports writing Pascal strings we can avoid
VLAs.
2016-09-03 11:47:33 +10:00
Erik de Castro Lopo
86d9fb853d psf_binheader_writef: Add writing of Pascal strings
AIFF headers can contain Pascal style strings which consist of a
single byte length (which limits them the 255 bytes) followed by
the string. The total is zero padded to an even number of bytes.
Tests included.
2016-09-03 11:40:08 +10:00
evpobr
60710409b0 configure.ac: Two minor fixes
* Replace obsolete AM_PROG_LIBTOOL with LT_INIT.
* Remove useless define AC_LIBTOOL_LANG_F77_CONFIG.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Closes: https://github.com/erikd/libsndfile/pull/141
2016-09-03 07:46:42 +10:00
Erik de Castro Lopo
de4e99c325 src/GSM610/lpc.c: Fixup
Commit 8d9cd93f26 fixed compiler warnings but changed a correct
for loop into an in-correct `memset` operation. This commit fixes
it.
2016-08-14 17:07:50 +10:00
Erik de Castro Lopo
8d9cd93f26 Fix compiler warnings from gcc 6.1.1 2016-08-13 12:10:40 +10:00
Erik de Castro Lopo
0ec474be9a README.md: Add libasound to the list of build deps 2016-07-28 21:15:59 +10:00
Erik de Castro Lopo
77691aa793 README.md: Another fix
For Debian/Ubuntu, fix build-essential and add python.
2016-07-27 06:25:42 +10:00
Erik de Castro Lopo
4640558527 README.md: Improve explanation of building from git 2016-07-26 19:24:37 +10:00
Erik de Castro Lopo
b3f677616e Fix spelling errors
* Two in error messages in library itself.
* One in man page for sndfile-interleave.
2016-07-20 20:05:38 +10:00
Erik de Castro Lopo
207b926557 Add file Building-for-Android.md
And link to it from README.md.
2016-07-16 22:07:41 +10:00
Erik de Castro Lopo
e8afbc370e Scripts/android-configure.sh: Minor updates
* Error out if ${ANDROID_TOOLCHAIN_HOME} is not set.
* Use default values for ${ANDROID_NDK_VER}, ${ANDROID_GCC_VER},
  ${ANDROID_API_VER} and ${ANDROID_TARGET} so they can be overridden.
2016-07-16 19:34:58 +10:00