Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#380 "apply replaygain" option uses locales when it should not

open
nobody
5
2013-04-30
2011-04-16
quadrispro
No

This bug was originally reported in the Debian BTS:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=498050

Original report follows, it applies to flac 1.2.1 and a patch is attached:
--------
flac has an undocumented option --apply-replaygain-which-is-not-lossless
for normalising the files' volume when decoding files.

The replaygain tags inside a file are in the format:
REPLAYGAIN_TRACK_GAIN=-2.29 dB
REPLAYGAIN_TRACK_PEAK=0.96014404

$ LC_NUMERIC=sv_SE.utf8 flac -d --apply-replaygain-which-is-not-lossless *.flac

01 d-moll.flac: INFO: applying album ReplayGain (gain=-2,00dB+preamp=0,0dB, low noise shaping, hard limiting) to output
01 d-moll.flac: WARNING: applying ReplayGain is not lossless
01 d-moll.flac: done

$ LC_NUMERIC=C flac -d --apply-replaygain-which-is-not-lossless *.flac

01 d-moll.flac: INFO: applying album ReplayGain (gain=-2.29dB+preamp=0.0dB, low noise shaping, hard limiting) to output
01 d-moll.flac: WARNING: applying ReplayGain is not lossless
01 d-moll.flac: done

Note that the gains differ. sv_SE uses a decimal comma while the data in
the tags use a decimal point. In that locale, the decoder considers the
decimal point an incorrect character and truncates the tag to "-2 dB".

Discussion

  • quadrispro
    quadrispro
    2011-04-16

     
  • Ulrich Klauer
    Ulrich Klauer
    2013-04-30

    Now in git as commit aa285f3ac18a9825e9081af87545c8406e10f2d1