diff options
| author | ozpv <39195175+ozpv@users.noreply.github.com> | 2026-06-20 03:11:03 -0500 |
|---|---|---|
| committer | ozpv <39195175+ozpv@users.noreply.github.com> | 2026-06-20 03:11:03 -0500 |
| commit | 029fc9d3cf4768d94a6e37380e1dcc1e758ae876 (patch) | |
| tree | e38d6533ac8a08fca1109e6e4ee92fe2e227e274 /src/windowed_fft.rs | |
| parent | 15452d1352dc01e4618a54c8159d8f049225d4fd (diff) | |
add vst3 support
Diffstat (limited to 'src/windowed_fft.rs')
| -rw-r--r-- | src/windowed_fft.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/windowed_fft.rs b/src/windowed_fft.rs index e99f1c1..b3a6bfa 100644 --- a/src/windowed_fft.rs +++ b/src/windowed_fft.rs @@ -2,7 +2,7 @@ #![allow(clippy::return_self_not_must_use)] use crate::{ - params::DEFAULT_WINDOW_TYPE, window_function::WindowFunction, window_size::WindowSize, + DEFAULT_WINDOW_TYPE, window_function::WindowFunction, window_size::WindowSize, window_type::WindowType, }; use num_complex::Complex; @@ -22,6 +22,8 @@ pub struct WindowedRealFft { } impl WindowedRealFft { + // clippy is very wrong here and passing window_size by ref will result in errors + #[allow(clippy::needless_pass_by_value)] pub fn new(window_size: WindowSize) -> Self { let window_function = DEFAULT_WINDOW_TYPE.new_function(&window_size); let window_size = window_size.inner(); @@ -35,7 +37,8 @@ impl WindowedRealFft { let spectrum = vec![Complex::ZERO; (window_size / 2) + 1]; - // scratches should be the same length for both left and right channels + // scratches should theoretically be the same length for forward and inverse operations + // So I reuse it on to save on allocations let scratch = forward.make_scratch_vec(); Self { @@ -60,6 +63,8 @@ impl WindowedRealFft { self.window_function = window_function; } + // clippy is very wrong here and passing window_size by ref will result in errors + #[allow(clippy::needless_pass_by_value)] pub fn window_size(&mut self, window_size: WindowSize) { if window_size == self.window_size.into() { return; |
