The only way to play bit-perfect apple music is to use iphone or ipad and connect it to dac using lightning to usb cable or the apple camera connection kit cable.
@coaltrain is using the correct method to play apple music.
macbook, macmini etc do not give bit perfect music. Everytime the song resolution changes you have to change it using Apple's Audio Midi setup app. Yes you heard me right. You have to change it everytime the song's resolution changes, else it will play at a fixed sample rate set by the audio midi setup app.
Worst of the lot is the Apple TV. It will resample everything to 48KHz.