diff options
| author | ozpv <39195175+ozpv@users.noreply.github.com> | 2026-05-18 15:20:06 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-18 15:20:06 -0500 |
| commit | 88bd6307ee43f3c3609d5b2f49d440d285185765 (patch) | |
| tree | 70b96bac6e1c4734f31b90e24526ea49b67fcc48 /src/audio.rs | |
| parent | 13e872165ed41e032246eddbe1b0750154ce7259 (diff) | |
add window function parameter
Diffstat (limited to 'src/audio.rs')
| -rw-r--r-- | src/audio.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/audio.rs b/src/audio.rs index 71be7d3..9e50465 100644 --- a/src/audio.rs +++ b/src/audio.rs @@ -93,6 +93,7 @@ impl<'a> PluginAudioProcessor<'a, RetainPluginShared<'a>, RetainPluginMainThread } let prev_window_size = self.params.get_window_size(); + let prev_window_type = self.params.get_window_type().as_bits(); // Receive any param updates from the main thread and/or the GUI. let has_ui_param_updates = self.params.fetch_updates(&self.shared.params); @@ -113,6 +114,13 @@ impl<'a> PluginAudioProcessor<'a, RetainPluginShared<'a>, RetainPluginMainThread } } + // update change in window type if needed + let window_type = self.params.get_window_type(); + if prev_window_type != window_type.as_bits() { + self.fft_left.window_function(&window_type); + self.fft_right.window_function(&window_type); + } + // Now let's process the audio, while splitting the processing in batches between each // sample-accurate event. for event_batch in events.input.batch() { |
