Skip to main content

make_window

Function make_window 

Source
pub fn make_window<T: Sample>(
    window: WindowType,
    n_fft: NonZeroUsize,
) -> NonEmptyVec<T>
Expand description

Generate window function samples.

Supports various window types including Rectangular, Hanning, Hamming, Blackman, Kaiser, and Gaussian.

§Arguments

  • window - The type of window function to generate.
  • n_fft - The size of the FFT, which determines the length of the window.

§Returns

A NonEmptyVec<f64> containing the window function samples.

§Panics

Panics if a custom window is provided with a size that does not match n_fft.