This patch fixes a number of problems with FLAC. Note this bug is a new patch that works with FLAC 1.4.0 and replaces bug 1214424. I couldn't figure out how to update that bug with a new patch.
1) Mainly it fixes flac so it properly tests for inline
in the configure script and consistently uses
FLAC_INLINE everywhere. This properly sets inline
to work on different compilers by using AC_C_INLINE.
Note you need to run autoheader and autoconf after
applying the patch for config.h to have the define
2) Fix src/share/replaygain_analysis so it compiles
with Sun Studio. Sun Studio doesn't like floating
points in array values. So I fixed this by changing
RMS_WINDOW_TIME from 0.050 to 50 (so it is specified
in ms rather than s). Then in the two places where
it is referenced I add " / 1000" so it gives the
same value. I think this is cleaner. Plus it works
with more compilers.
3) Note that it was necessary to redefine four things
as extern instead of static. This is because
Sun Studio does not allow you to reference static
elements from within extern inline functions.
bitreader_read_from_client and byte_to_unary_table
bitwriter_grow_ in src/libFLAC/bitwriter.c
is_big_endian_host_ in src/libFLAC/md5.c.
This was necessary because Sun Studio doesn't
allow you to reference static variables from
extern inline functions.
Also byteSwap in src/libFLAC/md5.c needed to be
more clearly defined as "extern" to make the
4) Sun Studio doesn't like the ^M characters at the
end of each line in
include/share/replaygain_analysis.h, so the
patch removes these.
Log in to post a comment.