pub struct DynamicsCompressor { /* private fields */ }Expand description
Dynamics Range Compressor with soft knee and make-up gain.
Implementations§
Source§impl DynamicsCompressor
impl DynamicsCompressor
Sourcepub fn new(
threshold_db: f32,
ratio: f32,
knee_db: f32,
attack_s: f32,
release_s: f32,
makeup_gain_db: f32,
sample_rate_hz: f32,
) -> Self
pub fn new( threshold_db: f32, ratio: f32, knee_db: f32, attack_s: f32, release_s: f32, makeup_gain_db: f32, sample_rate_hz: f32, ) -> Self
Creates a new dynamics compressor.
threshold_db: Threshold level in dBFS (e.g.-20.0).ratio: Compression ratio (e.g.4.0for 4:1).knee_db: Soft knee width in dB (e.g.6.0for smooth transition,0.0for hard knee).attack_s: Attack time in seconds (e.g.0.005for 5 ms).release_s: Release time in seconds (e.g.0.1for 100 ms).makeup_gain_db: Post-compression make-up gain in dB (e.g.4.0).sample_rate_hz: Audio sample rate in Hz (e.g.48000.0).
Trait Implementations§
Source§impl Clone for DynamicsCompressor
impl Clone for DynamicsCompressor
Source§fn clone(&self) -> DynamicsCompressor
fn clone(&self) -> DynamicsCompressor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DynamicsCompressor
Source§impl Debug for DynamicsCompressor
impl Debug for DynamicsCompressor
Source§impl DspNode<f32> for DynamicsCompressor
impl DspNode<f32> for DynamicsCompressor
Source§fn process_sample(&mut self, input: f32) -> f32
fn process_sample(&mut self, input: f32) -> f32
Process a single input sample and produce one output sample.
Source§fn process_block(&mut self, in_buf: &[T], out_buf: &mut [T])
fn process_block(&mut self, in_buf: &[T], out_buf: &mut [T])
Process a block of samples from
in_buf into out_buf.Source§fn process_in_place(&mut self, buf: &mut [T])
fn process_in_place(&mut self, buf: &mut [T])
Process a block of samples in place.
Auto Trait Implementations§
impl Freeze for DynamicsCompressor
impl RefUnwindSafe for DynamicsCompressor
impl Send for DynamicsCompressor
impl Sync for DynamicsCompressor
impl Unpin for DynamicsCompressor
impl UnsafeUnpin for DynamicsCompressor
impl UnwindSafe for DynamicsCompressor
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