An introduction to computer audio
To obtain bit perfect playback;
Disable all DSP like "Crossfade songs", "Sound Enhancer" and "Sound Check"
Disable the equalizer
If you use an outboard DAC over Toslink or USB; set volume to max
In Audio MIDI Setup match the sample rate with the sample rate of the audio.
iTunes uses a fixed sample rate.
Audio with a different sample rate is re-sampled to the setting in this panel.
If you want automatic sample rate switching you need a third party product like Bitperfect.
Just like Microsoft, Apple don’t support FLAC.
You can install Fluke to import FLAC in iTunes.
You can use software provided by Xiph.
A detailed description can be found here.