vincentneo/LosslessSwitcher

Automated Apple Music Lossless Sample Rate Switching for Audio Devices on Macs.

Swift

1,960

248 commits

updated Jun 7, 2026

See the code

README

header image with app icon

LosslessSwitcher switches your current audio device's sample rate to match the currently playing lossless song on your Apple Music app, automatically.

Let's say if the next song that you are playing, is a Hi-Res Lossless track with a sample rate of 192kHz, LosslessSwitcher will switch your device to that sample rate as soon as possible.

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

Installation

For macOS Big Sur 11.4 to macOS Sonoma 14.x

Please use releases of version 1.x, such as versions 1.0, 1.1 or 1.1.1 betas. Version 1.x also works up to macOS Sequoia 15.3.1.

You can find the latest stable release of the version 1.x branch here: Link to v1.1

For macOS Sequoia 15.4 onwards

Support for this is still in beta. You can try the latest version 2.0 beta here: Link to v2.0 Beta 1

Steps

  1. Download the .zip file of the preferred version.
  2. Drag the app to your Applications folder.

If you wish to have it running when logging in, you should be able to add LosslessSwitcher in System Settings:

> User & Groups > Login Items > Add LosslessSwitcher app

App details

There isn't much going on, when it comes to the UI of the app, as most of the logic is to:

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

As such, the app lives on your menu bar. The screenshot above shows it's only UI component that it offers, which is to show the sample rate that it has parsed from Apple Music's logs.

app screenshot, with music note icon shown as UI button

If you wish, the sample rate can also be directly visible as the menu bar item.

app screenshot with sample rate shown as UI button

Do also note that:

  • There may be short interuptions to your audio playback, during the time where the app attempts to switch the sample rates.
  • Prolonged use on MacBooks may accelerate battery usages, due to the frequent querying of the latest sample rate.

Bit Depth switching is also supported, although, enabling it will reduce detection accuracy, hence, it is not recommended.

Why make this?

Ever since Apple Music Lossless launched along with macOS 11.4, the app would never switch the sample rates according to the song that was playing. A trip down to the Audio MIDI Setup app was required. This still happens today, with macOS 12.3.1, despite iOS's Music app having such an ability.

I think this improvement might be well appreciated by many, hence this project is here, free and open source.

Prerequisites

Due to how the app works, this app is not, and cannot be sandboxed. It also has the following requirement, due to the use of OSLog API:

  • The user running LosslessSwitcher must be an admin. This is not tested and assumed due to this Apple Developer Forums thread.
  • Apple Music app must have Lossless mode on. (well, of course)

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

Disclaimer

By using LosslessSwitcher, you agree that under no circumstances will the developer or any contributors be held responsible or liable in any way for any claims, damages, losses, expenses, costs or liabilities whatsoever or any other consequences suffered by you or incurred by you directly or indirectly in connection with any form of usages of 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.

Version 1.x

CPUMac ModelmacOS VersionBeta macOS?Audio Device
IntelMacBook Pro 13 inch (Early 2015, Dual Core i5)11.6.2NoDenon AVR-X4400H
IntelMac mini (2018)12.2
12.4
NoDenon PMA-50
IntelMacBook Pro 13 inch (2018)12.3.1NoDenon PMA-50
IntelMacBook Pro 13 inch, four Thunderbolt 3 ports (2016)12.3.1NoTopping DX7 Pro
Apple SiliconMacBook Pro 13 inch (M1, 2020)12.3.1NoFX Audio DAC-X6
IntelMacBook Pro 15 inch (2016)12.4NoTopping D30Pro
Apple SiliconMac mini (M1, 2020)12.4NoMeridian Explorer 2
IntelHackintosh (XPS 9570, i7-8750H)12.4NoUniversal Audio Apollo X4
FiiO Q3
FiiO M5 (DAC mode)
IntelMacBook Pro 13 inch (2016)12.4
12.6.1
NoAudioQuest Dragonfly Cobalt
Apple SiliconMac mini (M1, 2020)12.4NoiFi Zen DAC V2
IntelMacBook Pro 15 inch (2018)12.4NoPS Audio Sprout
Apple SiliconMacBook Air 13 inch (2020)12.5.1NoShanling M8
Apple SiliconMac Studio (M1 Max, 2022)12.6NoFocusrite Scarlett 18i8 (2nd Gen)
IntelMacBook Pro 16 inch (2019)12.6NoMytek Brooklyn+ DAC
IntelMac mini (Late 2014)12.6.3NoNAD C658
Apple SiliconMac mini (M1, 2020)13.022A5286jTopping D50s
Apple SiliconMac mini (M1, 2020)13.0NoiBasso DC06
Khadass Tone 2 Pro
Apple SiliconMacBook Pro 14 inch (M1 Pro, 2021)13.0
13.0.1
NoTopping D10 Balanced
Apple SiliconMac mini (M1, 2020)13.0.1NoFiio K7
Fiio K5 Pro (AKM DAC)
Topping EX5
Apple SiliconMacBook Pro 14 inch (2021)13.0.1NoAudioQuest Dragonfly Black v1.5
Apple SiliconMacBook Air (M1, 2020)13.1NoSchiit Bifrost 2
IntelMacBook Pro 15 inch (2018)13.1NoApogee Groove
Apple SiliconiMac 24 inch (M1, 2021)13.1NoSMSL PO100
Apple SiliconMacBook Pro 14 inch (2021)13.1NoChord Mojo
Apple SiliconMac mini (M1, 2020)13.2NoRME ADI-2 DAC FS
Apple SiliconMacBook Pro 16 inch (M1 Max, 2021)13.2NoM-Audio Fast Track
Apple SiliconMacBook Pro 14 inch (M1 Pro, 2021)13.2NoTopping D10s
Apple SiliconMac Studio (M1 Max, 2022)13.2.1NoRME ADI-2 PRO FS R (Black Edition)
Intel27-inch iMac (2017)13.2.1NoChord Hugo M Scaler + TT2 Combo
Apple SiliconMac mini (M1, 2020)13.2.1NoMoondrop Moonriver 2
Apple SiliconMacBook Pro 13 inch (M1, 2020)13.3.1NoGustard X18
Intel27-inch iMac (Late 2014)13.3.1 (a)NoSMSL M500
Apple SiliconMac mini (M2 Pro, 2023)13.5NoFiiO K5 Pro
Apple SiliconMac mini (M2 Pro, 2023)13.5NoJDS Labs Element III MK 2
IntelMac mini (Late 2014)13.5 (Opencore)NoVLink192 to Rega DAC
IntelMacBook Pro 16 inch (2019)13.6.4NoVMV D1SE
IntelMacBook Pro 16 inch (2019)13.6.4NoDenon AVR-X6700H
Apple SiliconMacBook Pro 16 inch (M1 Max, 2021)14.023A5328bFocusrite Scarlett 2i2 3rd Gen, Internal MacBook DAC
IntelMacBook Air 13 inch (2020 i5 1.1 Ghz Quad-Core)14.023A5328dPreSonus Studio 1810c
Apple SiliconMacBoox Air 13 inch (M1, 2020)14.0NoCambridge Audio DacMagic 100
Apple SiliconMac Studio (M1 Max, 2022)14.4.1NoHidizs S9 PRO
Apple SiliconMacBook Air 13 inch (M2, 2022)14.4.1NoCambridge Audio DacMagic XS
Apple SiliconMacBook Pro 14 inch (M3 Pro, 2024)14.4.1NoRME ADI-2 PRO FS R (Black Edition)
IntelMac Pro 6.1 (2013)14.4.1 (Opencore)NoCambridge Audio Edge NQ
Apple SiliconMacBook Air 13 inch (M2, 2022)14.5NoHiBy FD3
Apple SiliconMacBook Pro 14 inch (M1 Pro, 2021)14.6.1NoFiiO BTR15
Apple SiliconMacBook Air 13 inch (M3, 2024)14.6.1NoiBasso DC03 Pro
IntelMacBook Pro 16 inch (i7, 2019)14.6.1NoFiio KA17
Apple SiliconMacBook Pro 16 inch (M1 Max, 2021)15.024A5264nInternal Soundcard
Focusrite 2i2 3rd Gen
M-Track 2x2
IntelMacBook Pro 15 inch (2012)15.1 (Opencore)24B5035eFiio KA3
Fiio KB3
Apple SiliconMac mini (M2, 2023)15.1.1NoSony NW-A55 (USB DAC mode)
Apple SiliconMac mini (M4, 2024)15.3.1NoMOTU M2

Version 2.x

CPUMac ModelmacOS VersionBeta macOS?Audio DeviceVersion
Apple SiliconMacBook Pro 13 inch (M1, 2020)15.4.1NoCambridge Audio CXA812.0 Beta 1
Apple SiliconMac Studio (M1 Max, 2022)15.4.1NoDenon PMA-150H2.0 Beta 1
Apple SiliconMacBook Pro 13 inch (M1, 2020)15.5NoCambridge Audio CXA812.0 Beta 2
Apple SiliconMacBook Pro 14 inch (M1 Max, 2021)15.5NoCambridge Audio DacMagic 200M2.0 Beta 2
Apple SiliconMacBook Pro 14 inch (M4 Pro, 2024)15.5NoCambridge Audio CXA812.0 Beta 2
IntelMac Pro 6.1 (2013) with OpenCore Patcher15.5NoCambridge Audio Edge NQ2.0 Beta 2
Apple SiliconMacBook Air 13 inch (M4, 2025)15.6.1NoAkliam PD52.0 Beta 2
Apple SiliconMac mini (M4, 2024)15.6.1NoFocusrite Scarlett 2i2 Gen42.0 Beta 2
IntelMacBook Pro 15 inch (2.3GHz i9, 2019)15.7.3NoFiio KA32.0 Beta 2
Apple SiliconMacBook Pro 14 inch (M2 Pro, 2023)26.0Pub. beta 2AudioQuest Dragonfly Red2.0 Beta 2
Apple SiliconMacBook Pro 14 inch (M3 Pro, 2023)26.0.1NoFiio K112.0 Beta 2
Apple SiliconMacBook Pro 14 inch (M1 Pro, 2021)26.1Dev. Beta 2iBasso DC Elite2.0 Beta 2
Apple SiliconMac mini (M1, 2020)26.1NoFiio K112.0 Beta 2
Apple SiliconMac mini (M1, 2020)26.1NoAyre QB-9 Twenty2.0 Beta 2
Apple SiliconMacBook Air 13 inch (M3, 2024)26.3NoFiio K172.0 Beta 3
Apple SiliconMacBook Air 13 inch (M1, 2020)26.3.1NoFosi Audio K5 Pro2.0

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

Do note that Steven Slate Audio VSX software may not be fully compatible with LosslessSwitcher, and both software may interfere with each other. Please refer to discussion https://github.com/vincentneo/LosslessSwitcher/discussions/100 for more information.

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, an easy to use Swift String scanner.
  • SimplyCoreAudio, by @rnine, a framework that makes CoreAudio so much easier to use.
  • PrivateMediaRemote, by @DimitarNestorov, in order to use private media remote framework.
applemusic
audio
automation
lossless-music
macos
menubar-app
oslog
sample-rate

Contributors

(top 30 of 58)

vincentneo

178 commits

MrVideo

3 commits

fparrav

3 commits

tommak-panda

2 commits

vincentneo/LosslessSwitcher

Automated Apple Music Lossless Sample Rate Switching for Audio Devices on Macs.

Swift

1,960

248 commits

updated Jun 7, 2026

See the code

README

header image with app icon

LosslessSwitcher switches your current audio device's sample rate to match the currently playing lossless song on your Apple Music app, automatically.

Let's say if the next song that you are playing, is a Hi-Res Lossless track with a sample rate of 192kHz, LosslessSwitcher will switch your device to that sample rate as soon as possible.

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

Installation

For macOS Big Sur 11.4 to macOS Sonoma 14.x

Please use releases of version 1.x, such as versions 1.0, 1.1 or 1.1.1 betas. Version 1.x also works up to macOS Sequoia 15.3.1.

You can find the latest stable release of the version 1.x branch here: Link to v1.1

For macOS Sequoia 15.4 onwards

Support for this is still in beta. You can try the latest version 2.0 beta here: Link to v2.0 Beta 1

Steps

  1. Download the .zip file of the preferred version.
  2. Drag the app to your Applications folder.

If you wish to have it running when logging in, you should be able to add LosslessSwitcher in System Settings:

> User & Groups > Login Items > Add LosslessSwitcher app

App details

There isn't much going on, when it comes to the UI of the app, as most of the logic is to:

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

As such, the app lives on your menu bar. The screenshot above shows it's only UI component that it offers, which is to show the sample rate that it has parsed from Apple Music's logs.

app screenshot, with music note icon shown as UI button

If you wish, the sample rate can also be directly visible as the menu bar item.

app screenshot with sample rate shown as UI button

Do also note that:

  • There may be short interuptions to your audio playback, during the time where the app attempts to switch the sample rates.
  • Prolonged use on MacBooks may accelerate battery usages, due to the frequent querying of the latest sample rate.

Bit Depth switching is also supported, although, enabling it will reduce detection accuracy, hence, it is not recommended.

Why make this?

Ever since Apple Music Lossless launched along with macOS 11.4, the app would never switch the sample rates according to the song that was playing. A trip down to the Audio MIDI Setup app was required. This still happens today, with macOS 12.3.1, despite iOS's Music app having such an ability.

I think this improvement might be well appreciated by many, hence this project is here, free and open source.

Prerequisites

Due to how the app works, this app is not, and cannot be sandboxed. It also has the following requirement, due to the use of OSLog API:

  • The user running LosslessSwitcher must be an admin. This is not tested and assumed due to this Apple Developer Forums thread.
  • Apple Music app must have Lossless mode on. (well, of course)

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

Disclaimer

By using LosslessSwitcher, you agree that under no circumstances will the developer or any contributors be held responsible or liable in any way for any claims, damages, losses, expenses, costs or liabilities whatsoever or any other consequences suffered by you or incurred by you directly or indirectly in connection with any form of usages of 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.

Version 1.x

CPUMac ModelmacOS VersionBeta macOS?Audio Device
IntelMacBook Pro 13 inch (Early 2015, Dual Core i5)11.6.2NoDenon AVR-X4400H
IntelMac mini (2018)12.2
12.4
NoDenon PMA-50
IntelMacBook Pro 13 inch (2018)12.3.1NoDenon PMA-50
IntelMacBook Pro 13 inch, four Thunderbolt 3 ports (2016)12.3.1NoTopping DX7 Pro
Apple SiliconMacBook Pro 13 inch (M1, 2020)12.3.1NoFX Audio DAC-X6
IntelMacBook Pro 15 inch (2016)12.4NoTopping D30Pro
Apple SiliconMac mini (M1, 2020)12.4NoMeridian Explorer 2
IntelHackintosh (XPS 9570, i7-8750H)12.4NoUniversal Audio Apollo X4
FiiO Q3
FiiO M5 (DAC mode)
IntelMacBook Pro 13 inch (2016)12.4
12.6.1
NoAudioQuest Dragonfly Cobalt
Apple SiliconMac mini (M1, 2020)12.4NoiFi Zen DAC V2
IntelMacBook Pro 15 inch (2018)12.4NoPS Audio Sprout
Apple SiliconMacBook Air 13 inch (2020)12.5.1NoShanling M8
Apple SiliconMac Studio (M1 Max, 2022)12.6NoFocusrite Scarlett 18i8 (2nd Gen)
IntelMacBook Pro 16 inch (2019)12.6NoMytek Brooklyn+ DAC
IntelMac mini (Late 2014)12.6.3NoNAD C658
Apple SiliconMac mini (M1, 2020)13.022A5286jTopping D50s
Apple SiliconMac mini (M1, 2020)13.0NoiBasso DC06
Khadass Tone 2 Pro
Apple SiliconMacBook Pro 14 inch (M1 Pro, 2021)13.0
13.0.1
NoTopping D10 Balanced
Apple SiliconMac mini (M1, 2020)13.0.1NoFiio K7
Fiio K5 Pro (AKM DAC)
Topping EX5
Apple SiliconMacBook Pro 14 inch (2021)13.0.1NoAudioQuest Dragonfly Black v1.5
Apple SiliconMacBook Air (M1, 2020)13.1NoSchiit Bifrost 2
IntelMacBook Pro 15 inch (2018)13.1NoApogee Groove
Apple SiliconiMac 24 inch (M1, 2021)13.1NoSMSL PO100
Apple SiliconMacBook Pro 14 inch (2021)13.1NoChord Mojo
Apple SiliconMac mini (M1, 2020)13.2NoRME ADI-2 DAC FS
Apple SiliconMacBook Pro 16 inch (M1 Max, 2021)13.2NoM-Audio Fast Track
Apple SiliconMacBook Pro 14 inch (M1 Pro, 2021)13.2NoTopping D10s
Apple SiliconMac Studio (M1 Max, 2022)13.2.1NoRME ADI-2 PRO FS R (Black Edition)
Intel27-inch iMac (2017)13.2.1NoChord Hugo M Scaler + TT2 Combo
Apple SiliconMac mini (M1, 2020)13.2.1NoMoondrop Moonriver 2
Apple SiliconMacBook Pro 13 inch (M1, 2020)13.3.1NoGustard X18
Intel27-inch iMac (Late 2014)13.3.1 (a)NoSMSL M500
Apple SiliconMac mini (M2 Pro, 2023)13.5NoFiiO K5 Pro
Apple SiliconMac mini (M2 Pro, 2023)13.5NoJDS Labs Element III MK 2
IntelMac mini (Late 2014)13.5 (Opencore)NoVLink192 to Rega DAC
IntelMacBook Pro 16 inch (2019)13.6.4NoVMV D1SE
IntelMacBook Pro 16 inch (2019)13.6.4NoDenon AVR-X6700H
Apple SiliconMacBook Pro 16 inch (M1 Max, 2021)14.023A5328bFocusrite Scarlett 2i2 3rd Gen, Internal MacBook DAC
IntelMacBook Air 13 inch (2020 i5 1.1 Ghz Quad-Core)14.023A5328dPreSonus Studio 1810c
Apple SiliconMacBoox Air 13 inch (M1, 2020)14.0NoCambridge Audio DacMagic 100
Apple SiliconMac Studio (M1 Max, 2022)14.4.1NoHidizs S9 PRO
Apple SiliconMacBook Air 13 inch (M2, 2022)14.4.1NoCambridge Audio DacMagic XS
Apple SiliconMacBook Pro 14 inch (M3 Pro, 2024)14.4.1NoRME ADI-2 PRO FS R (Black Edition)
IntelMac Pro 6.1 (2013)14.4.1 (Opencore)NoCambridge Audio Edge NQ
Apple SiliconMacBook Air 13 inch (M2, 2022)14.5NoHiBy FD3
Apple SiliconMacBook Pro 14 inch (M1 Pro, 2021)14.6.1NoFiiO BTR15
Apple SiliconMacBook Air 13 inch (M3, 2024)14.6.1NoiBasso DC03 Pro
IntelMacBook Pro 16 inch (i7, 2019)14.6.1NoFiio KA17
Apple SiliconMacBook Pro 16 inch (M1 Max, 2021)15.024A5264nInternal Soundcard
Focusrite 2i2 3rd Gen
M-Track 2x2
IntelMacBook Pro 15 inch (2012)15.1 (Opencore)24B5035eFiio KA3
Fiio KB3
Apple SiliconMac mini (M2, 2023)15.1.1NoSony NW-A55 (USB DAC mode)
Apple SiliconMac mini (M4, 2024)15.3.1NoMOTU M2

Version 2.x

CPUMac ModelmacOS VersionBeta macOS?Audio DeviceVersion
Apple SiliconMacBook Pro 13 inch (M1, 2020)15.4.1NoCambridge Audio CXA812.0 Beta 1
Apple SiliconMac Studio (M1 Max, 2022)15.4.1NoDenon PMA-150H2.0 Beta 1
Apple SiliconMacBook Pro 13 inch (M1, 2020)15.5NoCambridge Audio CXA812.0 Beta 2
Apple SiliconMacBook Pro 14 inch (M1 Max, 2021)15.5NoCambridge Audio DacMagic 200M2.0 Beta 2
Apple SiliconMacBook Pro 14 inch (M4 Pro, 2024)15.5NoCambridge Audio CXA812.0 Beta 2
IntelMac Pro 6.1 (2013) with OpenCore Patcher15.5NoCambridge Audio Edge NQ2.0 Beta 2
Apple SiliconMacBook Air 13 inch (M4, 2025)15.6.1NoAkliam PD52.0 Beta 2
Apple SiliconMac mini (M4, 2024)15.6.1NoFocusrite Scarlett 2i2 Gen42.0 Beta 2
IntelMacBook Pro 15 inch (2.3GHz i9, 2019)15.7.3NoFiio KA32.0 Beta 2
Apple SiliconMacBook Pro 14 inch (M2 Pro, 2023)26.0Pub. beta 2AudioQuest Dragonfly Red2.0 Beta 2
Apple SiliconMacBook Pro 14 inch (M3 Pro, 2023)26.0.1NoFiio K112.0 Beta 2
Apple SiliconMacBook Pro 14 inch (M1 Pro, 2021)26.1Dev. Beta 2iBasso DC Elite2.0 Beta 2
Apple SiliconMac mini (M1, 2020)26.1NoFiio K112.0 Beta 2
Apple SiliconMac mini (M1, 2020)26.1NoAyre QB-9 Twenty2.0 Beta 2
Apple SiliconMacBook Air 13 inch (M3, 2024)26.3NoFiio K172.0 Beta 3
Apple SiliconMacBook Air 13 inch (M1, 2020)26.3.1NoFosi Audio K5 Pro2.0

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

Do note that Steven Slate Audio VSX software may not be fully compatible with LosslessSwitcher, and both software may interfere with each other. Please refer to discussion https://github.com/vincentneo/LosslessSwitcher/discussions/100 for more information.

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, an easy to use Swift String scanner.
  • SimplyCoreAudio, by @rnine, a framework that makes CoreAudio so much easier to use.
  • PrivateMediaRemote, by @DimitarNestorov, in order to use private media remote framework.
applemusic
audio
automation
lossless-music
macos
menubar-app
oslog
sample-rate

Contributors

(top 30 of 58)

vincentneo

178 commits

MrVideo

3 commits

fparrav

3 commits

tommak-panda

2 commits

Languages

Swift

100.0%