Function compute_peaks

Source
pub(crate) fn compute_peaks(
    source: &mut dyn AudioSource,
    duration: f64,
) -> Peaks
Expand description

Sequentially decode source in 4800-frame blocks into 10 ms mono (min, max) buckets. Stops at the first all-zero block at/after duration (so an unknown duration of 0 stops at the first silent block).