LosslessSwitcher: Apple Music macOS version automatically switches music sample rate tool

Download link: https://github.com/vincentneo/LosslessSwitcher

LosslessSwitcher automatically switches the sample rate of your current audio device to match the lossless song currently playing in your Apple Music app.

Assuming the next song you're playing is a high-res lossless track with a sample rate of 192kHz, LosslessSwitcher will switch your device to that sample rate as quickly as possible.

The opposite happens when the next track happens to have a lower sample rate.

Install

Just go to the releases page of this repository. (Link to latest release)

Or, try the beta! (link)

Drag the app into your Applications folder. If you want it to run at login, you should be able to add LosslessSwitcher in System Preferences:

> User & Groups > Login Items > Add LosslessSwitcher app

application details

When it comes to the app's UI, there's not much going on, because most of the logic is:

  1. Read Apple Music's logs to see the song's sample rate.
  2. Set the sample rate to the device you are currently playing on.

So, the app lives on your menu bar. The screenshot above shows the only UI component it provides to display the sample rate it parses from the Apple Music log.

The sample rate can also be displayed directly as a menu bar item if you prefer.

Please also note:

  • There may be a brief interruption in your audio playback while the app is trying to switch sample rates.
  • Extended use on a MacBook may speed up battery usage due to frequent queries for the latest sample rate.

Why do this?

Since Apple Music Lossless launched with macOS 11.4, the app never switches the sample rate based on the song being played. Requires access to the Audio MIDI Setup application. This is still happening today in macOS 12.3.1, despite iOS's Music app having this functionality.

I thought this improvement might be appreciated by many, hence the project here, free and open source.

prerequisites

Due to the way the app works, this app is not and cannot be sandboxed. Due to the use of the OSLog API, it also requires the following:

  • The user running LosslessSwitcher must be an administrator. For this reason, this is not tested and assumed  Apple Developer Forums thread .
  • The Apple Music app must have lossless mode turned on. (well, of course)

Other than that, it should work on any Mac running macOS 11.4 or later.

disclaimer

By using LosslessSwitcher, you agree that in no event shall the developer or any contributor be liable or liable for any claim, damage, loss, expense, cost or liability or any other consequence suffered by or directly incurred by you or indirectly related to any form of use of the LosslessSwitcher.

Devices tested

Here are some device combinations tested to be working, by users of LosslessSwitcher. Regardless, you are still reminded to use LosslessSwitcher at your own risk.

CPU Mac Model macOS Version macOS Beta? Audio Device
Intel MacBook Pro 13 inch (Early 2015, Dual Core i5) 11.6.2 No Denon AVR-X4400H
Intel Mac mini (2018) 12.2 / 12.4 No Denon PMA-50
Intel MacBook Pro 13 inch (2018) 12.3.1 No Denon PMA-50
Intel MacBook Pro 13 inch, four Thunderbolt 3 ports (2016) 12.3.1 No Topping DX7 Pro
Apple Silicon MacBook Pro 13 inch (M1, 2020) 12.3.1 No FX Audio DAC-X6
Intel MacBook Pro 15 inch (2016) 12.4 No Topping D30Pro
Apple Silicon Mac mini (M1, 2020) 12.4 No Meridian Explorer 2
Intel Hackintosh (XPS 9570, i7-8750H) 12.4 No Universal Audio Apollo X4 & FiiO Q3 & FiiO M5 (DAC mode)
Intel MacBook Pro 13 inch (2016) 12.4 No AudioQuest Dragonfly Cobalt
Apple Silicon Mac mini (M1, 2020) 12.4 No iFi Zen DAC V2
Intel MacBook Pro 15 inch (2018) 12.4 No PS Audio Sprout
Apple Silicon MacBook Air 13 inch (2020) 12.5.1 No Shanling M8
Apple Silicon Mac Studio (M1 Max, 2022) 12.6 No Focusrite Scarlett 18i8 (2nd Gen)
Intel MacBook Pro 16 inch (2019) 12.6 No Mytek Brooklyn+ DAC
Apple Silicon Mac mini (M1, 2020) 13.0 (22A5286j) Developer Beta 2 Topping D50s
Apple Silicon Mac mini (M1, 2020) 13.0 (GA) No iBasso DC06, Khadass Tone 2 Pro
Apple Silicon MacBook Pro 14 inch (M1 Pro, 2021) 13.0 / 13.0.1 No Topping D10 Balanced
Apple Silicon Mac mini (M1, 2020) 13.0.1 No Fiio K7, Fiio K5 Pro (AKM DAC), Topping EX5
Apple Silicon MacBook Pro 14 inch (2021) 13.0.1 No AudioQuest Dragonfly Black v1.5

You can add to this list by modifying this README and opening a new pull request!

License

LosslessSwitcher is licensed under GPL-3.0.

Love the idea of this?

If you appreciate the development of this application, feel free to spread the word around so more people get to know about LosslessSwitcher. You can also show your support by sponsoring this project!

Dependencies

  • Sweep, by @JohnSundell, a easy to use Swift String scanner.
  • SimplyCoreAudio, by @rnine, a framework that makes CoreAudio so much easier to use.

Guess you like

Origin blog.csdn.net/galaxyview/article/details/128202001