An introduction to computer audio
The conversion from digital to analog is done by a Digital to Analog converter, a DAC for short.
This is a chip transforming the value of the samples to an electrical equivalent.
As this chipset doesn’t understand anything about computer files, you need a piece of software transforming all those different file formats (MP3, AAC, FLAC, WAV, etc.) to a format the DAC do understand (raw PCM)
This done by a Codec = Coder/Decoder.
In case of lossy compression (MP3) the question is how transparent the Codec is.
In the past there where audible differences between the various implementations.
Today the differences are small if not inaudible.
Using LAME is your best bet.