loop: fix the crossfade seam's residual discontinuity, plus six review minors

Normalizes crossfadeWeight over crossfade-1 so the last rendered frame lands at exactly the incoming tap instead of a residual step; corrects the CLAUDE.md invariant and seam test to match. Shares lerpSource/crossfadedSource/maxCrossfade, fixes stale docs/constants, and clears crossfade on the loop-OFF gesture.
This commit is contained in:
2026-07-31 17:59:58 -04:00
parent 0fe4166d7d
commit 3cb22e984d
12 changed files with 172 additions and 83 deletions
+3 -1
View File
@@ -71,7 +71,9 @@ std::int64_t xToFrame(const OverlayArea& area, std::int64_t frameCount, int x);
// strip, the column owns everything below it. Without that split, first-in-draw-order wins
// every coincident tie and the loser can never be dragged apart again.
inline constexpr int kMarkerHandleHeight = 10;
inline constexpr int kMarkerHandleHalfWidth = 5;
// Same half-width as the column's own grab band on purpose: the handle is that same grab
// tolerance, just confined to the top strip, not an independent tuning.
inline constexpr int kMarkerHandleHalfWidth = kMarkerGrabWidth;
Rect markerHandleRect(const OverlayArea& area, std::int64_t frameCount, std::int64_t frame);
// Which marker (index into the caller's parallel `frames` array, in draw order) a grab at