From 44a15bf67d2d6d32e372a00b286f9b7933363be3 Mon Sep 17 00:00:00 2001 From: daniel-c-harvey Date: Mon, 15 Jun 2026 22:44:20 -0400 Subject: [PATCH] =?UTF-8?q?fix(review):=20const=E2=86=92static=20readonly?= =?UTF-8?q?=20Debug=20silences=20CS0162;=20update=20stale=20rAF=20comment?= =?UTF-8?q?=20to=20renderedPlayhead()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controls/MixWaveformVisualizer.razor.cs | 2 +- DeepDrftPublic/Interop/visualizer/MixVisualizer.ts | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/DeepDrftPublic.Client/Controls/MixWaveformVisualizer.razor.cs b/DeepDrftPublic.Client/Controls/MixWaveformVisualizer.razor.cs index 7f14860..55ef5e6 100644 --- a/DeepDrftPublic.Client/Controls/MixWaveformVisualizer.razor.cs +++ b/DeepDrftPublic.Client/Controls/MixWaveformVisualizer.razor.cs @@ -58,7 +58,7 @@ public partial class MixWaveformVisualizer : ComponentBase, IAsyncDisposable // datum-fetch / subscription / playback-coupling seams log to the browser console (prefixed // `[MixVisualizer]`, same as the JS logs so the two interleave into one timeline). These pinpoint // which upstream link is broken when the ribbon stays blank — set false once confirmed healthy. - private const bool Debug = false; + private static readonly bool Debug = false; private const string Tag = "[MixVisualizer]"; private static void DebugLog(string message) diff --git a/DeepDrftPublic/Interop/visualizer/MixVisualizer.ts b/DeepDrftPublic/Interop/visualizer/MixVisualizer.ts index c8b5f6d..aafda76 100644 --- a/DeepDrftPublic/Interop/visualizer/MixVisualizer.ts +++ b/DeepDrftPublic/Interop/visualizer/MixVisualizer.ts @@ -742,10 +742,11 @@ export function create(canvas: HTMLCanvasElement): MixVisualizerHandle { // // Smoothness (spec §2e / §5.4): the scroll must advance every animation frame, not // step at Blazor's ~10 Hz playback-push cadence. We achieve that by interpolating - // the playhead on the wall clock — each frame uploads effectivePlayhead(), which - // advances the last pushed position by real time elapsed since the push. (The - // separate uTimeSeconds monotonic clock is reserved for Wave 3's field/blob motion - // and is unused by this parity shader; it is NOT what drives the scroll here.) + // the playhead on the wall clock — each frame uploads renderedPlayhead() (= effectivePlayhead() + // + the decaying jitter-correction offset), which advances the last pushed position by real time + // elapsed since the push and blends out any accumulated timing error. (The separate uTimeSeconds + // monotonic clock is reserved for Wave 3's field/blob motion and is unused by this parity shader; + // it is NOT what drives the scroll here.) /** Draw one still frame immediately, without scheduling a new rAF. */ function redrawOnce(): void {