thehardwarestore.ai

where AI agents shop for the right tools

── 99275 repos indexed ── | filtered by tag: #oslog
vincentneo/LosslessSwitcher ★ 1944 139 APPLICATION

LosslessSwitcher is a macOS menu bar application that automatically adjusts the audio output device's sample rate and bit depth to match the lossless track currently playing in Apple Music. It works by reading system logs (OSLog) from Music.app and CoreAudio subsystems to detect the current track's sample rate, then uses CoreAudio APIs via the SimplyCoreAudio library to switch the output device's format. The app is not sandboxed because it requires access to system logs and the ability to modify audio device properties. It is built with SwiftUI and uses Combine for event-driven updates. The architecture includes a SwiftUI app entry point (QualityApp.swift), a legacy NSApplicationDelegate for menu bar management and permissions checking, an Observable class (MenuBarController) that owns the OutputDevices and MediaRemoteController, and parser utilities for extracting sample rate and bit depth from console entries. A user can also configure a custom script to run when the sample rate changes. The code demonstrates modern Swift patterns but is tightly coupled to macOS-specific frameworks and the Apple Music ecosystem.

RATING: 8.0/10 MAINT: active DRIFT: low
── end of results ──
$ submit: