Skip to content

feat: add latency calibration UI with auto-detection and manual override#1115

Merged
ChuxiJ merged 1 commit intomainfrom
feat/issue-1106
Mar 27, 2026
Merged

feat: add latency calibration UI with auto-detection and manual override#1115
ChuxiJ merged 1 commit intomainfrom
feat/issue-1106

Conversation

@ChuxiJ
Copy link
Copy Markdown

@ChuxiJ ChuxiJ commented Mar 27, 2026

Summary

  • Adds latencyMsToSamples() utility to convert latency from milliseconds to audio samples at the current sample rate
  • Adds a "Re-detect" button in the Settings dialog Playback Latency section so users can re-measure audio output latency on demand
  • Displays latency values in both ms and samples (e.g. "15.0 ms (720 smp)") alongside the active compensation readout with sample rate
  • Adds 12 new unit tests covering ms-to-samples conversion, manual override precedence over auto-detected values, compensation seconds, and persistence across normalization calls

Closes #1106

Test plan

  • npx tsc --noEmit passes with 0 errors
  • npm test passes (17 tests in playbackLatency.test.ts, all green)
  • npm run build succeeds
  • Open Settings dialog, verify "Playback Latency" section shows detected latency in ms and samples
  • Click "Re-detect" button and verify latency values refresh
  • Enter a manual override value, save, verify "Manual override" badge appears
  • Clear manual override, save, verify it falls back to auto-detected

https://claude.ai/code/session_01KYEjWp985CYRCcSm9J46ps

Copilot AI review requested due to automatic review settings March 27, 2026 19:58
…ide (closes #1106)

- Add latencyMsToSamples() utility to convert ms to sample counts
- Add "Re-detect" button in Settings to re-measure audio latency on demand
- Display latency in both ms and samples at current sample rate
- Add comprehensive tests for ms-to-samples conversion, manual override
  precedence, and persistence across normalize calls

https://claude.ai/code/session_01KYEjWp985CYRCcSm9J46ps
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ChuxiJ ChuxiJ merged commit 5c116fa into main Mar 27, 2026
4 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.

feat: Latency calibration UI with auto-detection and manual override

2 participants