refactor(visualizer): remove dead sampleCount field from Datum — shader uses durationSeconds only

This commit is contained in:
daniel-c-harvey
2026-06-15 12:49:47 -04:00
parent b451dda79e
commit cab181db4b
@@ -130,8 +130,6 @@ function parseColor(css: string): [number, number, number] {
interface Datum {
/** GPU texture holding the loudness samples (R8, 1 row tall), linear-filtered. */
texture: WebGLTexture;
/** Number of loudness samples uploaded — used to map the texel-centre offset. */
sampleCount: number;
/** Total mix duration in seconds — needed to map time <-> texture coordinate. */
durationSeconds: number;
}
@@ -591,7 +589,7 @@ export function create(canvas: HTMLCanvasElement): MixVisualizerHandle {
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
gl.bindTexture(gl.TEXTURE_2D, null);
return { texture, sampleCount: samples.length, durationSeconds };
return { texture, durationSeconds };
}
return {