mirror of
https://github.com/robbert-vdh/nih-plug.git
synced 2026-07-01 02:36:54 +00:00
Implement the reset function everywhere
This commit is contained in:
@@ -116,14 +116,18 @@ impl Plugin for Stft {
|
||||
_buffer_config: &BufferConfig,
|
||||
context: &mut impl ProcessContext,
|
||||
) -> bool {
|
||||
// Normally we'd also initialize the STFT helper for the correct channel count here, but we
|
||||
// only do stereo so that's not necessary
|
||||
self.stft.set_block_size(WINDOW_SIZE);
|
||||
context.set_latency_samples(self.stft.latency_samples());
|
||||
|
||||
true
|
||||
}
|
||||
|
||||
fn reset(&mut self) {
|
||||
// Normally we'd also initialize the STFT helper for the correct channel count here, but we
|
||||
// only do stereo so that's not necessary. Setting the block size also zeroes out the
|
||||
// buffers.
|
||||
self.stft.set_block_size(WINDOW_SIZE);
|
||||
}
|
||||
|
||||
fn process(
|
||||
&mut self,
|
||||
buffer: &mut Buffer,
|
||||
|
||||
Reference in New Issue
Block a user