iTunes can play 'bit-perfect' music losslessly, but only if you do several things. The internal volume control must be set to the max, all digital signal processing, including equalizers, must be turned off, and the sample rate of the track you want to play must be set properly in Audio MIDI Setup before you open iTunes, which means if there is a sample mismatch, you either have to close iTunes, reset Audio MIDI Setup to the desired value, and then restart iTunes.
For example, if you have a CD, you can rip it to Apple Lossless files. These have a bit-depth of 16 bits and a sampling frequency of 44.1 kHz. If you purchase and down-load higher-definition music, perhaps 24-bit, 96kHz sampled lossless FLAC files, you can convert them to Apple Lossless without degrading the content (XLD is one such free software option). Now let's say you want to play the two sets of tracks sequentially. If you start iTunes playing the ripped CD and Audio MIDI Setup is set to 44.1 kHz sampling, the ripped CD can be played without degrading the content, but when iTunes reaches the 96kHz music, CoreAudio will down-sample it to 44.1 kHz, thus negating any benefit of having the higher sampling frequency.
Obviously, stopping iTunes, manually changing Audio MIDI Setup, and restarting iTunes quickly becomes a drag, so I came up with a hack that lets you avoid this problem. It involves using iTunes as a music browser that then hands over the task of playing the music to a more specialized player application that deals with the above-mentioned complications seamlessly and automatically. There is commercial software you can pay nearly a thousand dollars for to do this. The following hack enables you to do this at no cost.
The first thing you need to do is obtain and install the open-source, free player Audirvana from GoogleCode. Make sure 'Exclusive Access' mode is set in the Preferences.
You can drag and drop a succession of playlists or albums of different sampling frequencies from iTunes into the Audirvana playlist window and then hit the play button, and Audirvana will play all the music with bit-perfection, changing Audio MIDI Setup to match each track on the fly.
However, the following allows you to completely automate the process, eliminating the need to drag and drop the music from iTunes into the playlist window. It has the added advantage of permitting you to do this using Apple's Remote.app from your iPad, iPod, iPhone, etc., something Audirvana on its own cannot (yet) do.
To automate the handoff process:
Mac OS X Hints
http://hints.macworld.com/article.php?story=20110414045956265