3 #[derive(Debug,Clone,Copy,PartialEq)]
10 pub fn generate_window(mode: WindowType, scale: f32, size: usize, half: bool, dst: &mut [f32]) {
12 WindowType::Square => {
13 for n in 0..size { dst[n] = scale; }
18 param = consts::PI / ((2 * size) as f32);
20 param = consts::PI / (size as f32);
23 dst[n] = (((n as f32) + 0.5) * param).sin() * scale;
26 WindowType::KaiserBessel => {