fix(windows): apply live microphone gain and mute#120
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (13)
📝 WalkthroughWalkthroughLive microphone gain and mute control now runs through acknowledged FFmpeg commands, latest-wins renderer scheduling, bounded backend dispatch, rollback handling, and Windows installer smoke validation. ChangesLive microphone controls
Estimated code review effort: 5 (Critical) | ~120 minutes Sequence Diagram(s)sequenceDiagram
participant Studio
participant Backend
participant FFmpeg
participant SmokeProbe
Studio->>Backend: enqueue latest gain/mute update
Backend->>FFmpeg: send live volume command
FFmpeg-->>Backend: return command acknowledgement
Backend-->>Studio: return applied or confirmed rollback state
SmokeProbe->>FFmpeg: run live control probe
FFmpeg-->>SmokeProbe: produce acknowledgements and audio artifacts
Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed: private package registry requires authentication. Disable ESLint in CodeRabbit settings or use public packages. 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. Comment |
Problem
Windows microphones are captured directly by FFmpeg through DirectShow. Initial gain/mute values were baked into the FFmpeg filter graph, while Videorc's live update RPC only knew how to update the in-process CoreAudio capture path. A Windows recording therefore returned
native-audio-unavailable, rolled the controls back, and showed the warning from #117 even though microphone capture itself was healthy.The System Audio placeholder shown in the issue is a separate missing native adapter; it is not the cause of the microphone control failure.
Plan and implementation
volume@videorc_live_miccommand target, including neutral-gain sessions.ret:0.progress=continueboundary, proves acknowledgement crosses the unsafe legacy 2-second deadline but stays below 5 seconds, and verifies both finished WAV artifacts with FFmpeg.FFmpeg command-loop behavior is grounded in the upstream implementation: https://www.ffmpeg.org/doxygen/8.0/ffmpeg_8c_source.html
Acceptance criteria
Verification
2004/2000/2000msagainst the 5-second deadline, and both WAVs measured-18.1 -> -12.1 -> -91.0 -> -18.1 dB.1042passed,1skipped), Node script suite (619passed), TypeScript typecheck/lint/format, and desktop production build.1269passed,8ignored, one unrelated test skipped), and Windows cross-check (pass with the existing target-only warnings).pnpm smoke:recording-studiowas run; see Known gate blockers below.Known gate blockers
476x847while leaving the Metal target at960x540instead of adopting portrait output; the identical failure reproduces from the preview-untouched comparison branch and prevents the aggregate recording-studio command from reaching its final steps.Non-goals and follow-up
Closes #117
Summary by CodeRabbit
New Features
Bug Fixes