You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported by: jamie.gifford
Date: 2018-04-22T01:52:11Z
Status: Fix Released
Importance: High
Launchpad Issue: lp1766042
In Mixxx 2.1.0, FLAC files are decoded with a -6dB gain. Tested on Linux and Mac.
The problem is reproducible always. Eg, create a 440Hz full-scale sine in both WAV and FLAC formats with "sox -r 44100 -n a440.wav synth 20 sine 440" and "sox -r 44100 -n a440.flac synth 20 sine 440". The WAV file plays correctly; the FLAC file will play at -6dB.
Looks to me that the problem is in soundsourceflac.cpp, in void SoundSourceFLAC::flacMetadata(const FLAC__StreamMetadata* metadata), in the code:
m_sampleScaleFactor = CSAMPLE_PEAK
/ CSAMPLE(FLAC__int32(1) << bitsPerSample);
Since FLAC samples are signed, a FLAC full-scale sample will only reach bitsPerSample-1, not bitsPerSample (eg, in a 24 bit stream the maximum sample magnitude would be 1<<23). This means that m_sampleScaleFactor is out by a factor of two, hence -6dB.
I /thought/ my FLAC files sounded quieter! Thank you very much for the detailed analysis! (Do you use GitHub and want to make a pull request so you get credit in the commit history?)
Reported by: jamie.gifford
Date: 2018-04-22T01:52:11Z
Status: Fix Released
Importance: High
Launchpad Issue: lp1766042
In Mixxx 2.1.0, FLAC files are decoded with a -6dB gain. Tested on Linux and Mac.
Looks to me that the problem is in soundsourceflac.cpp, in void SoundSourceFLAC::flacMetadata(const FLAC__StreamMetadata* metadata), in the code:
I think the code should read
The text was updated successfully, but these errors were encountered: