pub struct ShortSpectrum { /* private fields */ }Expand description
One channel’s short-window linear magnitudes, and nothing else.
The per-channel half of the stereo field (ADR-0215) reads its band energies
through BandSplitter, which reads the short
window’s magnitudes alone — so a per-channel pass needs neither the long
window nor the log-band axis. A second SpectrumAnalyzer per channel would
plan an 8192-point FFT and carry its ~120 kB of buffers for nothing.
Every buffer is heap-held, including the taper: Analyzer
keeps two of these and is constructed and moved by value.
Implementations§
Source§impl ShortSpectrum
impl ShortSpectrum
Sourcepub fn analyze(&mut self, window: &[f32]) -> &[f32]
pub fn analyze(&mut self, window: &[f32]) -> &[f32]
FFT window and return its linear magnitudes, on the same amplitude
scale SpectrumAnalyzer::magnitudes publishes — so a band mean taken
from these is comparable with the mono one bin for bin.
A window shorter than WINDOW_SIZE leaves the tail of the transform
zeroed rather than panicking, exactly as the long window’s fill does.