Repository navigation
Add opt-in output lock for disconnected audio devices - #481
Draft
applepiepp wants to merge 1 commit into
Draft
applepiepp wants to merge 1 commit into
applepiepp wants to merge 1 commit into
Conversation
temporaryna
added a commit
to temporaryna/FineTune
that referenced
this pull request
Nov 16, 2026
…isconnect Port of upstream PR ronitsingh10#481. When the lock is enabled in Audio settings, follows-default apps are guarded to the selected output: if it disconnects they stay silent (volume and mute preserved) instead of failing over raw at full volume, and the guard releases only when the same UID rebuilds on reconnect. While the lock is on, every audio-capable process is pre-tapped so nothing can leak raw past its guard (fork addition matching the lock's promise). Two lock tests adapted to fork semantics (unconfigured silent apps have no tap until the lock turns on) and the suite is serialized: fixtures touch app-global TCC and NSApplication state. The settle helper now sleeps briefly - fixed yield counts raced under parallel suite load. HUD popupHiddenShowUpdatesPanel is environment-dependent upstream (reads the real frontmost app) and fails when a fullscreen window has focus - pre-existing, unrelated to this change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When an HDMI monitor is powered off during playback, audio can fall back to another available speaker. This proposes an opt-in output-device lock: managed single-output apps stay silent while the chosen output is absent and return to it, with their volume and mute state preserved, after it reconnects. The setting is off by default.
Related: #375. This adds an optional no-fallback policy; it does not claim to resolve every reconnect scenario described there.
Implementation
Validation
Review and testing still needed
This is an AI-assisted proposed implementation, submitted as a draft for maintainer review. The behavior silences managed playback; it does not pause the media timeline or guarantee system-wide silence. Ignored apps, explicit multi-output routes, unrelated explicit outputs, and system sounds are outside that guarantee. Newly discovered helper processes can emit initial samples before protection is installed.
Sleep/wake, five simultaneously playing apps, other output transports, and broader multi-output/system-sound interactions have not been hardware-tested. These remaining checks are why this is a draft rather than a claim of release readiness. The temporary trial's bundle ID, private settings, updater changes, and local paths are not included.
I would prefer this to become a supported upstream option rather than maintaining a separate distribution. Please let me know whether the policy/API fits the project or should be narrowed before proceeding.