Skip to main content

hamming_window

Function hamming_window 

Source
pub fn hamming_window(out: &mut [f32]) -> Result<(), AudioError>
Expand description

Fill out with a Hamming window of length out.len().

Periodic convention w[n] = a0 − a1·cos(2πn/N) with a0 = 0.54, a1 = 0.46 and denominator N = out.len(). Unlike Hann it does not reach zero at the edges (w[0] = a0 − a1 = 0.08), which is the defining property of the Hamming taper.

Returns AudioError::InvalidParameter if out is empty.