Skip to content

Sound delay: close out #68 part 1 (test for settings saved before the delay) - #181

Merged
Skeyelab merged 1 commit into
mainfrom
issue-68-sound-delay
Oct 23, 2026
Merged

Skeyelab merged 1 commit into
mainfrom
issue-68-sound-delay

Conversation

@Skeyelab

Copy link
Copy Markdown
Member

Closes #68

The manual sound delay (part 1 of #68) was already built and merged in #101 (4e44383), then extended to sound early (-500 to 500 ms). Checked against #68's criteria:

Criterion Where it's covered
With a delay of D ms, the tone's onset at an AnalyserNode after the delay lags the element by about D frontend/src/audio/soundDelay.browser.test.ts, "delays video sound by the setting" (300 ms: 250 to 380)
Delay 0 adds no delay and sets up no Web Audio routing same file, "routes the audible videos only when there is a delay to apply"
DelayNode in the shared Web Audio context, before the output frontend/src/audio/videoAudio.ts (createDelay, connected to the destination)
0-500 ms in the Sound panel, applied to all video sound frontend/index.html #sound-delay, applySoundDelay
Saved with the sound settings settings.json sound_delay (engine/cameras.py); reload covered in test_a_sound_delay_lines_video_sound_up_with_the_projectors_late_picture
Old saved settings with no delay load as 0 this PR: test_settings_saved_before_the_sound_delay_load_it_as_zero

The new test was mutation-checked: with the default changed to 40, it fails (and so do 3 other tests); with the default restored, everything passes.

The follow-up, auto-measuring the delay with the camera and mic plus the real-rig check, is #180.

Tests

  • uv run pytest -q: 292 passed, 11 skipped
  • npx tsc --noEmit: OK
  • npx vitest run --maxWorkers=2: 394 passed, 1 skipped
  • American spelling: OK

)

The setting itself shipped in #101; this was the one acceptance point
without a test.

Assisted-by: Claude Code:claude-opus-5-5
@Skeyelab
Skeyelab merged commit 4dfffad into main Oct 23, 2026
4 checks passed
@Skeyelab
Skeyelab deleted the issue-68-sound-delay branch October 23, 2026 19:42
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.

Sound and picture sync: sound delay setting

1 participant