Skip to content

Commit

Permalink
Plugin::processor/editor take &mut self
Browse files Browse the repository at this point in the history
  • Loading branch information
micahrj committed Mar 18, 2024
1 parent fee31d2 commit b72e240
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/gain/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ impl Plugin for Gain {
Ok(())
}

fn processor(&self, _config: Config) -> Self::Processor {
fn processor(&mut self, _config: Config) -> Self::Processor {
GainProcessor {
params: self.params.clone(),
}
}

fn editor(&self, _parent: Parent) -> Self::Editor {
fn editor(&mut self, _parent: Parent) -> Self::Editor {
NoEditor
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ pub trait Plugin: Send + Sized + 'static {
fn get_param(&self, id: ParamId) -> ParamValue;
fn save(&self, output: &mut impl Write) -> io::Result<()>;
fn load(&mut self, input: &mut impl Read) -> io::Result<()>;
fn processor(&self, config: Config) -> Self::Processor;
fn editor(&self, parent: Parent) -> Self::Editor;
fn processor(&mut self, config: Config) -> Self::Processor;
fn editor(&mut self, parent: Parent) -> Self::Editor;

#[allow(unused_variables)]
fn latency(&self, config: &Config) -> u64 {
Expand Down

0 comments on commit b72e240

Please sign in to comment.