Repository navigation
fix(audio): bypass toggle no longer greys out after being turned off - #358
Merged
Merged
Conversation
The "internal direct output" toggle was enabled only while the current output was reported available. Turning it off closes the direct stream and re-evaluates the route from cached results (a format Android mixed, or a probe taken while our own stream held the output), so the toggle often came back greyed out and could only be re-enabled after an app restart or a route change. - Lock the toggle only for permanent impossibilities (Android too old, native library missing); route/format-specific results stay shown in the subtitle but no longer block re-enabling. - Re-enabling clears the mixed-format list, the open cache and the cached probe, so the output is actually tested again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LR3s8LM4rGRXJiyve854EE
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.
Problem
In Settings, after turning Internal direct output off, the toggle often comes back greyed out and can only be switched on again after restarting the app (or changing the audio route).
Why: the toggle was enabled only while the current output was reported
available. Turning the feature off closes the direct stream and re-evaluates the route from cached results:MIXED_BY_ANDROIDfor the whole route);EXCLUSIVE_REFUSED).Those caches were only cleared on a route change, hence the restart.
Fix
InternalDirectAvailability.canEnable: the toggle is locked only for permanent impossibilities (ANDROID_TOO_OLD,NATIVE_MISSING). Route- or format-specific results stay visible in the subtitle but no longer block re-enabling.setWanted(true)clearsmixedRoutes,openCacheandcachedProbe, so re-enabling actually re-tests the output instead of replaying the old verdict.Tests
InternalDirectSignalPathTest: newtoggleStaysReachableUnlessTheDeviceCanNeverBypasstest (18/18 tests pass on currentmain).🤖 Generated with Claude Code
https://claude.ai/code/session_01LR3s8LM4rGRXJiyve854EE