longandCursor 8f14f3190e fix(metronome): 修复第二拍延迟两倍间隔的 bug
drift correction 逻辑写反了:
  drift = now - nextTickAt   (此时为负数,下一拍还在未来)
  nextDelay = intervalMs - drift    = 2 × intervalMs

正确做法直接计算"目标时刻距现在还有多久":
  nextDelay = nextTickAt - now  

现象:点击开始,第一拍立即响,但第二拍要等两倍拍间隔才响。
现在第一拍响完就立刻按 BPM 节奏进入第二拍。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 11:44:06 +08:00
2026-05-07 10:48:21 +08:00
2026-03-27 18:06:12 +08:00
2026-04-13 09:44:10 +08:00
2026-05-22 17:55:54 +08:00
2026-03-01 14:17:59 +08:00
2026-03-01 14:17:59 +08:00
2026-03-20 13:56:40 +08:00
2026-05-22 18:00:22 +08:00
2026-03-23 18:02:16 +08:00
1
2026-04-29 18:41:39 +08:00
2026-03-09 09:55:04 +08:00
2026-05-25 11:33:01 +08:00
2026-04-20 16:01:59 +08:00
2026-04-20 16:01:59 +08:00
2026-05-08 16:07:39 +08:00
1
2026-04-21 15:56:04 +08:00
2026-03-01 14:17:59 +08:00
S
Description
No description provided
MIT
475 MiB
Languages
JavaScript 28.7%
Vue 25.2%
java 24.1%
PHP 14.6%
TypeScript 4.2%
Other 3.2%