Skip to content

fix(windows): end the audio track where the video ends - #946

Merged
EtienneLescot merged 1 commit into
mainfrom
claude/recording-audio-tail
Sep 30, 2026
Merged

EtienneLescot merged 1 commit into
mainfrom
claude/recording-audio-tail

Conversation

@EtienneLescot

@EtienneLescot EtienneLescot commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #942. Part of #920.

Cause

  • Every Windows take carried 0.44 to 0.58 s of audio past its video (three takes of 13 to 113 s; a constant gap, so a tail, not drift).
  • At stop, the helper quiesces WGC and stops the microphone, loopback, device watcher, keep-alive and webcam, each within its own budget, and only then stops the mixer. The mixer is clock-driven: it kept writing chunks, silence included, through that half second.

Change

Verified

  • New mixer-track-ends-at-the-pause-before-a-stop: a pause followed 300 ms later by a stop ends the track at the pause (410 ms for a pause at 418 ms, the 10 ms chunk grid). Without the pause, the stop would carry it 300 ms further.
  • Full native build, all native tests pass (121 in audio_sample_utils_test).

Pending

  • A real take: ffprobe -show_entries stream=codec_type,duration should read audio and video within about one chunk (10 ms) of each other.

🤖 Generated with Claude Code

Every Windows take carried 0.44 to 0.58 s of audio past its video
(measured on three takes of 13 to 113 s, a constant gap, so a tail). The
stop sequence quiesces WGC and stops the microphone, loopback, device
watcher, keep-alive and webcam before it stops the mixer, and the mixer
is clock-driven: it kept writing chunks through that half second.

The mixer is now paused on the stop request, the same request the video
writer stops on. The pause writes what the cushion holds up to that
instant and nothing after; a pause already in place is left as it is.

New test: a pause followed 300 ms later by a stop ends the track at the
pause (410 ms for a pause at 418, the chunk grid).

Fixes #942
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 1 minute.

Check out review usage here.

View limit details

Limit details: You’ve used all 8 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 2db3e2c8-fe40-4614-99af-fdd690e22153

📥 Commits

Reviewing files that changed from the base of the PR and between 32857bb and f9d21b9.

📒 Files selected for processing (2)
  • electron/native/wgc-capture/src/audio_sample_utils_test.cpp
  • electron/native/wgc-capture/src/main.cpp
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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.

@EtienneLescot

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@EtienneLescot
EtienneLescot merged commit f9c4035 into main Sep 30, 2026
18 checks passed
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.

Recording (Windows): end the audio track where the video ends

1 participant