[flac-dev] Bug in FLAC or in GCC or somewhere else?

lvqcl lvqcl.mail at gmail.com
Fri May 30 12:17:58 PDT 2014


I noticed that 32-bit flac (from git) compiled with GCC 4.8.3 or 4.9.0
calculates incorrect ReplayGain values. The most common value it produces
is -55.17 dB.

It is possible to avoid this bug by compiling
src/share/replaygain_analysis/replaygain_analysis.c
a) either without -msse2 option
b) or with -O2 instead of -O3
c) another solution is to add -mfpmath=sse option along with -msse2.


For GCC 4.9.0 it's enough to add __attribute__ ((__target__ ("arch=i686")))
or __attribute__ ((__target__ ("fpmath=sse"))) to the following functions
in replaygain_analysis.c: analyzeResult(), GetTitleGain() and GetAlbumGain().

Can anybody confirm this?


More information about the flac-dev mailing list