Repository navigation
fix(macos): don't report system audio as unauthorized while the Mac is silent - #17
Merged
Merged
Conversation
…s silent A Core Audio process tap only calls back while a tapped process is playing. Starting capture on a quiet Mac produced no callbacks, so the watchdog declared 'not authorized' and stopped the system-audio lane; the onboarding probe likewise reported 'Denied'. The watchdog now only counts time during which an output device is running in another process, and the probe taps LCT's own process while playing a short silence, so audio flows exactly when recording is allowed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 tasks done
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.
Summary
Fixes a false "not authorized" for system audio introduced with the Core Audio tap (#16).
Root cause (found while testing P2 on a real Mac): a Core Audio process tap only calls back while a tapped process is actually playing. With the Mac silent, an authorized tap delivers no callbacks either. The #16 watchdog treated "no callback within 3 s (twice)" as a denial, so:
Fix
CoreAudioOutputActivity: is any output device running in another process (kAudioDevicePropertyDeviceIsRunningSomewhereand not…IsRunning, so LCT's own microphone engine never counts; LCT's private tap aggregates skipped).SystemAudioTap(target: .ownProcessOnly)) while LCT plays a short digital silence (SilencePlayer), so audio flows exactly when recording is allowed, independent of other apps.Test results
./Scripts/run_tests.sh: 447 tests, 0 failures, no new warnings; CLT build clean. New tests: nothing playing → never denied; playback starting later → only audible time counts; probe plays and stops silence; capture tap is exclusive-of-LCT while the probe tap is LCT-only. Fakes only — no real tap or audio output in tests.granted, row ✓ (previously "Denied").🤖 Generated with Claude Code