← Gallery Streaming meters — chunk-size invariance

Streaming meters — chunk-size invariance

streaming/analyzers — environment-blind

Live meters shouldn't care how the audio arrives: feed them one big buffer or a stream of random-sized chunks, and the readings must come out identical. These are the same worker-safe analyzers proven in examples/node/streaming-meters.mjs, run in the browser: a 0.5-amp 440Hz sine is pushed into createRmsMeter monolithically and as seeded-random 37–1999-sample chunks (every RMS within 1% of 0.5/√2, both runs bitwise-identical); a 0.05→0.8 amplitude step at sample 16384 goes into createFluxAnalyzer (argmax flux within ±1 frame of the first window containing the step; first frame flux exactly 0). The flux curve is drawn as chunks stream in.