pub struct Gain;Expand description
weirdnet.gain: multiplies the samples by a gain in decibels, optionally inverting the polarity.
| Parameter | Range | Default |
|---|---|---|
gain_db | -60 to +24 dB | 0 |
invert | on or off | off |
Zero dB with no invert returns the input’s samples unchanged (shared, not copied).
Trait Implementations§
Source§impl Plugin for Gain
impl Plugin for Gain
Source§fn id(&self) -> &'static str
fn id(&self) -> &'static str
The stable id, for example
"weirdnet.gain". Saved in projects, so it never changes.Source§fn process(
&self,
input: &Waveform,
values: &ParamValues,
) -> Result<Waveform, PluginError>
fn process( &self, input: &Waveform, values: &ParamValues, ) -> Result<Waveform, PluginError>
Processes
input. values are already resolved against Plugin::params: complete, typed and in range.
Returns a new waveform (which may share the input’s samples when nothing changed) or an error.Auto Trait Implementations§
impl Forget for Gain
impl Freeze for Gain
impl Move for Gain
impl RefUnwindSafe for Gain
impl Send for Gain
impl Sync for Gain
impl Unpin for Gain
impl UnsafeUnpin for Gain
impl UnwindSafe for Gain
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more