3

Suppose I have a compressed version of a song in .flac format that I want to listen to using a music player. Since flac is a lossless audio format, I know that the original (uncompressed) song can be reconstructed from it.

The question is: do music players do that by default? In other words, do they decompress the song before playing it?

If they do, would it be exactly like listening to the original, uncompressed song?

1 Answer 1

3

Yes. Without decompression a flac file contains just pseudo-random data. A media player requires an ordered stream of PCM stereo audio samples in order for them to be converted to analogue audio via a DAC chip. Therefore, we implement 'codecs' (Code-Decode) to handle the decoding of the flac data to the ordered stream of PCM samples we require to be fed to the DAC.

There are various different types of codec, some use 'lossless' compression techniques, some us 'lossy' compression techniques.

A 'lossless' codec will retrieve an identical sample stream from coded data. A 'lossy' codec will retrieve an 'audibly similar' sample stream from it's coded data.

Codecs are specific. You can't decode one data stream from Codec A with a different codec format.

Therefore, the answer to your question is - yes - it would be exactly like listening to the original uncompressed song.

Remember that media players don't all support all codec types. Check with your media player first before using a particular codec to encode your music.

2
  • 1
    Great! I still have some .wav files in my music player because I thought they would sound a little bit better than .flac files, but I guess that now I can compress them without worries Sep 18, 2019 at 7:19
  • You should be good to go with anything lossless. There may be some zero-padding differences at the start and/or end, but otherwise identical.
    – Mark
    Sep 18, 2019 at 9:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.