If you want truly bit perfect audio with Apple Music, then your only option is connecting an iOS device directly to an external DAC via USB. However, using a full blown Mac is often more convenient than using your phone.
When using a Mac, if you wanted the bitrate of your DAC to match what your are playing on Apple Music, you had to manually change the bitrate output in the “Audio MIDI Setup” app within the Mac OS. It’s not truly bit perfect, but it works. That being said, who wants to have to manually do this every time the song or album changes to a new bitrate?
I’ve been dealing with this annoying scenario for more than a year now. Tonight, out of desperation, I decided to spend some time searching for a solution. Searching the web, I found one! It’s called LosslessSwitcher and you can download it here. It’s free, open source, works, and does what you want it to do. The only slight issue, is that when changing to a different bitrate, there’s a momentary gap in music playback, but I’ll take it. That’s my only complaint, and it only happens when the bitrate changes.
I’m so excited about this GitHub project, that I sponsored the author a one time donation of $10. This is the first time I’ve ever contributed to an open source project, but I hope the developer continues to work on this app and improve it. It’s that important! In fact, Apple should incorporate this code into their OS.
Download it, spread the word, and if you’re happy with the app, consider contributing a few bucks towards the developer.