I’m sure there is something I am not understanding here.
I have a flac file ripped with EAC from commercial CD. Playing this file over SONOS sounds fine. Playing this flac file with VLC or importing into Audacity and playing produces audible and awful distortion on peaks.
Attached is a sample of the signal in Audacity where the distortion occurs…
I cannot work out why this should be. All I am trying to do is use the original flac file (which has always sounded ok in the past on SONOS) imported into Audacity and to export again as mp3 for different purpose. The exported mp3 at 192/variable shows the same distortion as the flac when played with VLC.
FLAC and MP3 are both compressed formats and their job is to change things in desirable ways. What happens if you leave the original CD sound as WAV – the format of the sound on the CD (assuming an Audio CD)? Do any of these effects happen?
There should be no distortion added by Flac encoding. You say " Playing this file over SONOS sounds fine", so I think we can assume that there is no problem with the file.
You have not said what operating system you are using, but I’d guess that you have the playback level set too high somewhere causing the distortion. Most modern operating systems have multiple places for adjusting the playback level.
Of course I was totally ignoring the fact that I was playing via a laptop headphone output and maybe a particularly crappy one at that. Might be particularly sensitive to playback levels as well.