pub struct GainBlock<S>where
S: Sample,{
pub level_db: Parameter<S>,
pub base_gain: S,
/* private fields */
}Expand description
A gain control block that applies amplitude scaling.
Level is specified in decibels (dB).
Fields§
§level_db: Parameter<S>Gain level in dB (-80 to +30).
base_gain: SBase gain multiplier (linear) applied statically to the signal.
Implementations§
Trait Implementations§
Source§impl<S> Block<S> for GainBlock<S>where
S: Sample,
impl<S> Block<S> for GainBlock<S>where
S: Sample,
Source§fn process(
&mut self,
inputs: &[&[S]],
outputs: &mut [&mut [S]],
modulation_values: &[S],
context: &DspContext,
)
fn process( &mut self, inputs: &[&[S]], outputs: &mut [&mut [S]], modulation_values: &[S], context: &DspContext, )
Process audio through this block. Read more
Source§fn input_count(&self) -> usize
fn input_count(&self) -> usize
Returns the number of input ports this block accepts.
Source§fn output_count(&self) -> usize
fn output_count(&self) -> usize
Returns the number of output ports this block produces.
Source§fn modulation_outputs(&self) -> &[ModulationOutput]
fn modulation_outputs(&self) -> &[ModulationOutput]
Returns the modulation outputs this block provides. Read more
Source§fn set_smoothing(&mut self, sample_rate: f64, ramp_time_ms: f64)
fn set_smoothing(&mut self, sample_rate: f64, ramp_time_ms: f64)
Configure smoothing time for parameter changes. Read more
Source§fn channel_config(&self) -> ChannelConfig
fn channel_config(&self) -> ChannelConfig
Returns how this block handles multi-channel audio. Read more
Auto Trait Implementations§
impl<S> Freeze for GainBlock<S>where
S: Freeze,
impl<S> RefUnwindSafe for GainBlock<S>where
S: RefUnwindSafe,
impl<S> Send for GainBlock<S>
impl<S> Sync for GainBlock<S>
impl<S> Unpin for GainBlock<S>where
S: Unpin,
impl<S> UnwindSafe for GainBlock<S>where
S: UnwindSafe,
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