Repository navigation
Add opt-in PCM audio and scoped CoreAudio capture - #2
Merged
Merged
Conversation
undivisible
marked this pull request as ready for review
October 3, 2026 20:17
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.
The existing bridge controls FaceTime calls but exposes no media API. This adds opt-in audio support while leaving BridgeClient, helper IPC, and call control unchanged.
audioprovides validated, owned Float32 PCM frames, a bounded drop-newest channel with statistics, synchronous/poll/async consumption, and capture/injection backend contracts. Callers own processing; no runtime or new third-party dependency is added.coreaudio-captureadds a macOS 14.2+ process-output tap scoped to an explicit PID, output-device UID, and stream index. A preallocated native ring feeds a Rust worker. Capture defaults to refusal; explicit startup, source-change checks, cancellation, and cleanup errors are documented. Non-macOS builds expose an unsupported-platform stub.Validation on exact head
df8b8e80395eb02471052ecf30432621efcee19a: all 18 serial, locked/offline local gates passed with the configured sccache wrapper unchanged. This includes strict Clippy, default/private-api/CLI/audio/capture/all-feature checks and builds, 13 audio-only tests, 19 capture/all-feature tests, the generated-audio example, actual Rust 1.85 all-feature checks and 19 tests, and Rust 1.85 Linux cross-target checking of all targets. The native sources also passed ASan/UBSan synthetic-buffer and mocked-cleanup tests plus ThreadSanitizer concurrent-ring stress; those native files are unchanged. Independent exact source review found no remaining findings. GitHub Actions CI passed both jobs on this exact head: the full macOS job and fresh Rust 1.85 Linux resolution, 16 portable runtime tests, and the generated-audio example. All audio tests use generated PCM, refused permission, or mocked teardown. No call, live audio, permission prompt, driver installation, or default-device change is involved.Known limits: process output may include ringing and mixed participants; it is not internal FaceTime/RTP/per-participant PCM. Real permission/device behavior, macOS/SDK 14.2, and FaceTime end-to-end capture/injection remain unverified. Severe HAL teardown failure is surfaced as CleanupFailed and can retain HAL resources until process exit; callbacks then discard input. See docs/audio.md for the full ownership and routing contract.