Repository navigation
feat(desktop-gpui): Clean Up tab, silence skipping, and preview speed - #2774
flyingwebie wants to merge 5 commits into
Conversation
|
@flyingwebie is attempting to deploy a commit to the Cap Software Inc Team on Vercel. A member of the Team first needs to authorize it. |
|
@greptileai review |
|
@flyingwebie thanks for rebuilding this on main and dropping the fork workflow, the Clean Up flow looks really well thought through. A few things before we can take it: 1) Please split it into separate PRs: the multi-display placement fix ( |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… speed menu Clean Up detects silences in the recording and cuts them from the timeline (detection lives in kernels/src/silence.rs). Playback can skip silences, with silence marks shown on the timeline, and a preview speed menu sets the pitch-preserving preview rate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e clip offsets Mic and system audio offsets come straight from project-config.json. A large negative offset grew the combined silence envelope without limit, allocating and scanning a huge buffer as soon as the editor opened. Offsets are now clamped and the envelope never grows past the longest track. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…x while preparing - TimeStretcher goes back to passthrough when the rate returns to exactly 1.0: the source is moved back to the last emitted sample and the stretcher is flushed, so 1x playback is bit-identical again after a speed change. - The playback clock stays at 1x while adopted preparing audio (which has no stretcher) owns playback, and picks the rate up at the handoff. - Trim doc comments that restated the code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ck speed while preparing - Editor waveforms are set as soon as their peaks are ready; the Clean Up loudness envelopes are computed afterwards, so opening the editor no longer waits for them. - The preview speed menu is disabled, and the playhead uses 1x, while the editor is still preparing, since that audio path only plays at 1x. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
42da475 to
4d8565a
Compare
|
@richiemcilroy thanks for the detailed review. All points are addressed and the branch is rebased on the current
Press-to-clock moves in ~11 ms prefetch steps and has the same spread on both sides. I used Tests: |
🔀 chore: sync upstream main and the PR CapSoftware#2774 review changes
Clean Up tab, silence skipping, and a pitch-preserving preview speed for the GPUI editor. Rebuilt on the current
main.The two small fixes that used to be in this PR are now separate, as asked in review:
global_macos_work_area)export_audio.rs)The playback-rate engine in
crates/editoroverlaps with #2780 (J/K/L shuttle). This PR is on hold for that decision; I can rebase onto whichever engine you pick.Commits
audio.rs,audio_output.rs,playback.rs,editor_instance.rs).kernels/src/silence.rs) and cuts them from the timeline. Playback can skip silences, with silence marks on the timeline, and a speed menu sets the preview rate.TimeStretcher::resume_passthroughmoves the source back to the last emitted sample and flushes. 1x playback is bit-identical again after any speed change. New test:returning_to_unit_rate_resumes_bit_identical_passthrough.load_editor_waveformscallsset_waveformsas soon as the peaks are ready. The Clean Up loudness envelopes are computed afterwards. The tab shows "Analyzing audio…" until they arrive.Benchmark at 1x
editor-playback-benchmarkoncap-performance-fixtures/reference-recording.cap,--fps 60 --frames 300 --resolution half --headless, release build, Apple M4. Before =mainat d16fd19, after = this branch. 11 alternating runs each, medians (p95 in brackets):Press-to-clock moves in ~11 ms prefetch steps and has the same spread on both sides (75–150 ms before, 76–140 ms after).
Testing
cargo test -p cap-editor --lib: 209 passed, 0 failedcargo clippy -p cap-editor --all-targets: cleancargo test --bin cap-gpuiinapps/desktop-gpui: 1264 passed, 0 failedcargo fmt --allclean for the touched files🤖 Generated with Claude Code