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
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
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>.
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
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.
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.
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.
* 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.
It should now be possible to build libsndfile from a git checkout, at
least on Linux. No idea if it will work on other systems.
Additionally, if one builds on linux from a git checkout and then builds
a distribution tarball, it should be possible to transfer that distribution
tarball to a system without the GNU autotools and build it using CMake. This
however has not been tested.
Fix an issue introduced in commit a1f41d90bf.
Earlier versions of Arm (before armv7) did not handle un-aligned
accesses so that GCC warns about casts that increase alignment
requirements (like casts from `char*` to `int*`). Fix this by changing
the pointer from `char*` to `int*` and casting back to `char*` as needed
instead of doing the reverse.
There has been a long standing issue where something was not quite
right with the endian-ness handle of PAF files. This was difficlt to
track down because of the difficulty in getting access to a Paris Audio
system. Fortunately, Jeremy Friesner <jfriesne@gmail.com> was able to
provide some test files and a preliminary patch.