Skip to content

fix(audio): notify when virtual sink is restored#711

Draft
qiin2333 wants to merge 1 commit into
masterfrom
codex/audio-switch-notice
Draft

fix(audio): notify when virtual sink is restored#711
qiin2333 wants to merge 1 commit into
masterfrom
codex/audio-switch-notice

Conversation

@qiin2333
Copy link
Copy Markdown
Collaborator

@qiin2333 qiin2333 commented Jun 4, 2026

改了啥喵

  • Added a generic system tray notification helper for short runtime explanations outside the Web UI.
  • When Windows default playback changes during a stream that is using a virtual audio sink, Sunshine still restores the assigned virtual sink, but now explains why with a tray notification.
  • Rate-limited the notification to once every 30 seconds so Windows role updates do not spam the user.

为啥要改

The real hard-control scenario is host audio streaming with a virtual sink, not VB-Cable microphone redirection. If Sunshine selected a virtual audio device for host audio streaming, Windows playback changes are restored back to that virtual sink so capture/muting behavior keeps working. Users can hit that from the Windows audio switcher and otherwise only see the device jump back.

This puts the explanation at the moment the user actually hits the behavior, without implying that VB-Cable mic redirection needs to lock the default speaker.

验证

  • git diff --check
  • npm run build
  • cmake --build build --target sunshine --config RelWithDebInfo -j 1 -v was attempted, but the local build stops before these changes at third-party/moonlight-common-c/enet/callbacks.c with cc.exe returning code 1 and no compiler diagnostic in the Ninja output.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 4, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8ec3749e-0a2b-4a98-8702-a1b5be60d149

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/audio-switch-notice

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@qiin2333 qiin2333 force-pushed the codex/audio-switch-notice branch from 360d4cd to 0021fe7 Compare June 4, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant