Skip to main content

Module sample_window

Module sample_window 

Source
Expand description

SampleWindow: a fixed-capacity window of the newest audio samples.

This is the step before the Waveform widget in a live meter: capture code pushes frames as they arrive, and each paint reads the window, oldest sample first. The window is a ring buffer over a Vec<f32> allocated once in SampleWindow::new, so SampleWindow::push never allocates. Pure Rust: nothing here touches time, threads or files, so it builds for wasm32.

Contract: contracts/present-sample-window-v1.yaml.

Structsยง

SampleWindow
The newest capacity audio samples, oldest first.