Add audio-sync waveform panel - #432
Open
RufanMelfor wants to merge 1 commit into
Open
Conversation
Adds a collapsible "Audio Sync Waveform" panel to the calibration controls showing overlaid L/R peak-amplitude envelopes for a window of audio around the playhead, so a sync_offset frame error shows up as a visible shift between the two traces instead of requiring a guess-and-check loop against the rendered preview. - reco-io: calibration_io::extract_audio_pcm_window() extracts a windowed audio segment (ffmpeg -ss/-t) instead of always reading from the start of the file; extract_audio_pcm() now delegates to it. - reco-gui: new waveform module downsamples PCM into a smoothed peak envelope, normalized per L/R pair so a real mic-level mismatch stays visible instead of being independently stretched away. A background thread re-extracts it as the playhead moves (throttled, polled from the always-running timer tick so it keeps updating while paused, not just while playing/seeking). - Window width (frames around the playhead) and panel height are live-adjustable via two LineEdits. - Changing sync_offset forces a recompute so the panel reflects the new offset instead of showing a stale envelope. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
All contributors have signed the CLA. Thank you! |
Contributor
Author
|
I have read the CLA Document and I hereby sign the CLA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a collapsible "Audio Sync Waveform" panel to the calibration
controls, showing overlaid left/right peak-amplitude waveforms for a
window of audio around the playhead. A
sync_offsetframe error showsup as a visible shift between the two traces, instead of requiring a
guess-and-check loop against the rendered preview.
reco-io:calibration_io::extract_audio_pcm_window()extracts awindowed audio segment (ffmpeg
-ss/-t) instead of always readingfrom the start of the file;
extract_audio_pcm()now delegates to it.reco-gui: newwaveformmodule downsamples PCM into a smoothedpeak envelope, normalized per L/R pair so a real mic-level mismatch
between the two cameras stays visible rather than being independently
stretched away. A background thread re-extracts it as the playhead
moves (throttled, polled from the always-running timer tick so it
keeps updating while paused, not only while playing/seeking).
live-adjustable.
sync_offsetforces a recompute so the panel reflects thenew offset instead of showing a stale envelope.
This is a focused port of the audio-sync waveform panel only - it does
not include the separate "auto-detect sync offset" feature (IMU/audio
cross-correlation), which is unrelated UI/logic and can be its own PR
if wanted.
Test plan
cargo fmt --all -- --checkcargo check -p reco-gui --all-targets(full link skipped locallyto avoid clobbering a running dev build;
cargo buildwasconfirmed to succeed up to the link step)
cargo test -p reco-gui -p reco-io— all passing, including 12 newwaveform::testsunit testscargo clippy -p reco-gui -p reco-io --all-targets -- -D warnings— no new findings; failures shown are the same pre-existing
reco-coredead-code/unsafe-ptr issues already tracked by Clear pre-existing clippy -D warnings failures on Windows #423