summaryrefslogtreecommitdiff
path: root/src/audio.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio.rs')
-rw-r--r--src/audio.rs8
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() {