Apple Music listeners have access to hi-res lossless audio, with sample rates of up to 192 kHz. However, Macs have a big issue when it comes to playing songs with high sample rates — the macOS Music app doesn’t seem to be able to switch the device’s sample rate automatically depending on the song that’s being played.
LosslessSwitcher is a free, open-source app designed to address this issue. It runs in the menu bar and checks the sample rate of music being played, then adjusts the output device’s sample rate in the Audio MIDI Setup app.
Automatic sample rate switching for your Mac
Normally, you would have to select a preferred audio format setting from the MIDI Setup utility, and songs played in the Music app would either play normally or be upsampled or downsampled to the specified sample rate. This can lead to data loss in both scenarios, which is why it is better avoided.
LosslessSwitcher gets around this by checking the sample rate of songs being played in the Music app at all times, and then changing the audio output format in the Audio MIDI Setup app automatically. The current sample rate will also be displayed in the menu bar for you to check.
It’s worth remembering that you need to enable lossless audio from the macOS Music app’s preferences in order to take advantage of this feature.
Brief audio interruption when switching sample rate
At the moment, there is an issue that may be a dealbreaker for a lot of users. When a new song starts playing, and it has a different sample rate than the previously played track, there will be a small interruption a couple of seconds after playback starts, when the app switches to the required sample rate.
The interruption is very brief, barely noticeable for some, but audiophiles are nothing if not perceptive. If your music library uses several different sample rates, these small interruptions will likely become annoying.
There may also be a non-negligible impact on your device’s battery life, since the app needs to query the current sample rate very frequently in order to make the switch when necessary.
Great idea, but may need more work
LosslessSwitcher is an interesting app for audiophiles who want to get the best possible quality out of Apple Music on macOS. It’s great in theory, but the brief interruptions experienced when switching sample rates may make it unusable for some. Best to try it out for yourself to see if it’s a worthwhile tradeoff.
Version 1.1 Build 5 Beta
Abandoned pause/play issue due to #9 side effect
An additional detection route via Core Media messages have been implemented:
aimed at 192kHz/96kHz switching to 48kHz issue
there was an earlier iteration with Core Audio messages instead (build 4), but omitted due to message only showing up for 192kHz but not any lower sample rates.
App now shows version and build to hopefully make releases less ambiguous:
build 3 = v1.1 beta 1
build 5 = v1.1 beta 2
build 4 = not released in binary form, but can be compiled if wished to (86edbda)