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:
@@ -125,6 +125,12 @@ impl Plugin for Sine {
|
||||
true
|
||||
}
|
||||
|
||||
fn reset(&mut self) {
|
||||
self.phase = 0.0;
|
||||
self.midi_note_freq = 1.0;
|
||||
self.midi_note_gain.reset(0.0);
|
||||
}
|
||||
|
||||
fn process(&mut self, buffer: &mut Buffer, context: &mut impl ProcessContext) -> ProcessStatus {
|
||||
let mut next_event = context.next_midi_event();
|
||||
for (sample_id, channel_samples) in buffer.iter_mut().enumerate() {
|
||||
|
||||
Reference in New Issue
Block a user