# LosslessSwitcher

一款 macOS 菜单栏应用，可自动将音频设备的采样率调整为与 Apple Music 正在播放的无损歌曲相匹配。

> 这是 OpenNavo 上 LosslessSwitcher 页面的 Markdown 版本，内容与网页相同： <https://opennavo.com/zh/apps/losslessswitcher>

- **最新版本**: `2.0,2`
- **主页**: <https://github.com/vincentneo/LosslessSwitcher>
- **分类**: [系统工具](https://opennavo.com/zh/categories/utilities)
- **安装**: `brew install --cask losslessswitcher`
- **近 30 天安装**: 36
- **Homebrew**: Homebrew 仍提供，OpenNavo 已暂停推荐
- **下载地址**: <https://github.com/vincentneo/LosslessSwitcher/releases/download/2.0/LosslessSwitcher2.app.zip>
- **SHA-256**: `bf2cd61b9afa1a0caa7a491b25ccb2cc12f09db3b9831c0d814854083dceae8a`

SHA-256 只用来核对下载的文件是否完整，不代表安全认证。

## 安装与卸载内容

```json
[
  {
    "declaration": {
      "uninstall": [
        {
          "quit": "com.vincent-neo.LosslessSwitcher"
        }
      ]
    },
    "phase": "uninstall",
    "sources": [],
    "type": "uninstall"
  },
  {
    "declaration": {
      "app": [
        "LosslessSwitcher.app"
      ],
      "target": "/Applications/LosslessSwitcher.app"
    },
    "phase": "install",
    "sources": [
      "LosslessSwitcher.app"
    ],
    "target": "/Applications/LosslessSwitcher.app",
    "type": "app"
  },
  {
    "declaration": {
      "zap": [
        {
          "trash": "~/Library/Preferences/com.vincent-neo.LosslessSwitcher.plist"
        }
      ]
    },
    "phase": "cleanup",
    "sources": [],
    "type": "zap"
  }
]
```

## 介绍

LosslessSwitcher 会监测 Apple Music 播放，并自动更改当前音频设备的采样率，使其与正在播放的无损曲目相匹配。切换到采样率不同的曲目时，应用会尝试相应调整设备。

- 读取 Apple Music 日志以识别当前歌曲的采样率，并将其应用到当前音频设备。
- 在 macOS 菜单栏运行；界面可显示解析出的采样率，也可直接将其显示为菜单栏项目。
- 也支持切换位深，但开发者指出启用后会降低检测准确性，因此不建议启用。

安装此 Homebrew cask，请运行 `brew install --cask losslessswitcher`。根据 cask 要求，应用需要 macOS Sequoia（15）或更高版本。Apple Music 必须启用无损模式，运行应用的账户必须是管理员。项目将 Sequoia 15.4 及更高版本上的 2 版本支持描述为 beta。更改采样率时音频可能短暂停顿；频繁检查也可能增加 MacBook 的电池耗用。

来源：[项目主页](https://github.com/vincentneo/LosslessSwitcher) · [Homebrew cask](https://raw.githubusercontent.com/Homebrew/homebrew-cask/HEAD/Casks/l/losslessswitcher.rb)

## 系统要求

- macOS 15 起 · 应用版本: 2.0,2 · Intel · <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/l/losslessswitcher.rb> · 核查于 2026-12-06
  - <https://github.com/vincentneo/LosslessSwitcher/releases/download/2.0/LosslessSwitcher2.app.zip>
  - SHA-256: `bf2cd61b9afa1a0caa7a491b25ccb2cc12f09db3b9831c0d814854083dceae8a`
- macOS 15 起 · 应用版本: 2.0,2 · Apple 芯片 · <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/l/losslessswitcher.rb> · 核查于 2026-12-06
  - <https://github.com/vincentneo/LosslessSwitcher/releases/download/2.0/LosslessSwitcher2.app.zip>
  - SHA-256: `bf2cd61b9afa1a0caa7a491b25ccb2cc12f09db3b9831c0d814854083dceae8a`

## LosslessSwitcher 的安全事实

这里只列可以核验的事实，并注明来源和日期，不是安全认证。要检查你下载的文件，可以用 OpenNavo 在本机扫描。

- <https://github.com/vincentneo/LosslessSwitcher> · 是否开源: 是 — <https://github.com/vincentneo/LosslessSwitcher> · 核查于 2026-11-13

## 卸载

- `brew uninstall --cask losslessswitcher`

普通卸载会删除应用本身，设置和缓存会保留。

### 深度清理（可选）

- `brew uninstall --zap --cask losslessswitcher`

`--zap` 还会删除 Homebrew 定义里列出的设置、缓存等文件，其中可能有其他应用共用的数据，删除后无法恢复；它也不保证没有任何残留。请先备份需要保留的数据；如要保留设置和缓存，请不要加 `--zap`。

普通卸载会删除应用本身，设置和缓存会保留。

- 文件和文件夹: `~/Library/Preferences/com.vincent-neo.LosslessSwitcher.plist` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/l/losslessswitcher.rb> · 以上条目来自 Homebrew 定义，核查于 2026-12-06；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。

## 最新版本说明

### 3.0-beta1 (2026-03-01)

An early peek to the next version of LosslessSwitcher!

- Borrows the Process() way of getting logs, rather than relying on OSLogStore, from https://github.com/vincentneo/LosslessSwitcher/issues/195, special thanks to @FantasticSkyBaby, which hopefully solves https://github.com/vincentneo/LosslessSwitcher/discussions/115
- Hopefully fixes https://github.com/vincentneo/LosslessSwitcher/issues/190, https://github.com/vincentneo/LosslessSwitcher/issues/134?
- Best effort to match sample rate with track, aims to fix https://github.com/vincentneo/LosslessSwitcher/issues/159

IMPORTANT: a profile is needed, which can be downloaded and installed from https://eclecticlight.co/2023/03/08/removing-privacy-censorship-from-the-log/
Profile Direct Link: https://eclecticlight.co/wp-content/uploads/2023/03/enablelogprivatedata.zip

You should always exercise caution by reading the above blog post to know what you're installing. Do also note that the profile is external, not made by me, and not signed by me either.

This profile lets the app map sample rate data to whichever track its supposed to belong to, which helps with the https://github.com/vincentneo/LosslessSwitcher/issues/159 issue.

Why is the profile needed? In Apple logs, some fields are marked as `<private>` without it. One of these fields that is privatised is the track name, which comes with the sample rate and bit depth log message.

For beta 1, it will not work properly without the profile (I tried). This is because I'm slightly drained right now after a day spent on this, not logically clear how to infer which data belongs to which track, if that makes sense to you.

As per always, I make no guarantees that it will work. Hopefully it does though.

## 资料与来源

- <https://opennavo.com/zh/apps/losslessswitcher>
- <https://opennavo.com/zh/apps/losslessswitcher/versions>
- <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/l/losslessswitcher.rb> · 核查于 2026-12-06
- <https://formulae.brew.sh/cask/losslessswitcher>
- <https://github.com/vincentneo/LosslessSwitcher> · 核查于 2026-11-13
