feat(windows): add externally managed audio capture - #5647
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ee9144461d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
23ecf7d to
7383096
Compare
|



Description
I use an audio mixer to route applications to different outputs, including a dedicated output for Moonlight. I want Sunshine to capture that output without changing the Windows default device. Otherwise, applications that follow the default can end up on the wrong output, or Sunshine and the mixer can keep undoing each other's changes.
This adds an Externally Managed Audio option on Windows. With it enabled, Sunshine captures the configured
audio_sinkand leaves default devices and device formats alone. It requires an explicit sink and won't fall back to another device if that sink is unavailable. Playback stays under the mixer's control, so the Virtual Sink and Moonlight host-playback settings don't affect routing in this mode.The option is off by default. This builds on the direct capture support in #5408, which intentionally kept default-device switching for existing setups. This PR lets external mixers opt out without changing that behavior for everyone else.
Testing
Built and tested on Windows x64 and ARM64. The native test suites, frontend build, and browser checks pass.
Tested stereo playback and reconnecting from Moonlight while the mixer kept a separate local output. Added regression tests for sink selection, unavailable endpoints, endpoint reactivation, and compatibility with the option disabled.
Real-device unplug/replug and surround playback haven't been tested.
Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage
See our AI usage policy.