Repository navigation
feat(audio): follow system default devices on macOS - #173
Merged
Merged
Conversation
bilalyazicioglu
marked this pull request as ready for review
October 10, 2026 08:34
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.
Description
On macOS, connecting a headset could leave tincan on the still-working built-in devices. Streams opened with the default choice now follow system default changes on the existing one-second recovery tick.
Named CLI devices, remembered devices, and successful manual selections remain pinned, including when recovery falls back to the default. Each picker now offers System default (follow changes) to resume following and clear that side's saved preference.
Automatic changes synchronize the active device and microphone gate, preserve pending gate edits under the correct microphone, and cancel stale calibration. A same-device recovery retains the live gate. On macOS, open settings poll device lists even when a pinned stream emits no recovery event. Reconnected devices appear automatically, browsing keeps the highlighted device by name across reordering, and a disappeared selection falls back to the actual active device. Long device lists keep the highlighted choice visible; repeated outage notices are suppressed independently for input and output.
Default polling is limited to macOS. Linux sound-server routing and Windows stream recovery retain their existing platform scope. Recovery of an unavailable pinned device still permits a default fallback, without enabling following or automatically returning when the original device reconnects.
Fixes #160
Type of Change
Validation
cargo test --locked --offline -- --quiet: 377 passed; 6 deliberately ignored (asset generators, internet discovery, and hardware-dependent test).cargo clippy --all-targets --locked --offline -- -D warnings,cargo fmt --all --check, andgit diff --checkpassed.live_macos_streams_recover_and_keep_transferring_sampleswith BlackHole and built-in devices: a transmitted 440 Hz signal returned through real CPAL/resampler/ring-buffer callbacks; failed selections preserved working audio; default transitions and simulated driver-loss recovery kept the original capture consumer alive.Real AirPods connect/disconnect and Bluetooth profile changes during a call remain a manual release check. The hardware test does not change global system defaults. This draft is prepared for the macOS/Linux/Windows CI matrix; no release tag is created.
Checklist
cargo testand all non-ignored tests pass.cargo clippy --all-targetsand resolved all warnings.cargo fmt.