pub struct BrickwallLimiter { /* private fields */ }Expand description
Brickwall limiter state.
Implementations§
Source§impl BrickwallLimiter
impl BrickwallLimiter
Sourcepub fn new(
ceiling_db: f64,
lookahead_ms: f64,
release_ms: f64,
sample_rate: u32,
channels: usize,
) -> Self
pub fn new( ceiling_db: f64, lookahead_ms: f64, release_ms: f64, sample_rate: u32, channels: usize, ) -> Self
Create a new limiter.
ceiling_db: ceiling in dBFS (e.g., -1.0)lookahead_ms: look-ahead time in milliseconds (e.g., 1.0)release_ms: release time in milliseconds (e.g., 50.0)sample_rate: audio sample ratechannels: number of channels (typically 2)
Sourcepub fn default_safe(sample_rate: u32, channels: usize) -> Self
pub fn default_safe(sample_rate: u32, channels: usize) -> Self
Create a limiter with default safe settings: -1 dBFS, 1ms look-ahead, 50ms release.
Sourcepub fn process(&mut self, data: &mut [f64], frames: usize)
pub fn process(&mut self, data: &mut [f64], frames: usize)
Process a block of interleaved f64 audio IN PLACE.
REAL-TIME SAFE: no allocations, no locks, no I/O.
Sourcepub fn process_block(
&mut self,
input: &[f64],
output: &mut [f64],
frames: usize,
)
pub fn process_block( &mut self, input: &[f64], output: &mut [f64], frames: usize, )
Process a block of interleaved f64 audio. Correct look-ahead implementation.
REAL-TIME SAFE: no allocations, no locks, no I/O.
Sourcepub fn gain_reduction_db(&self) -> f64
pub fn gain_reduction_db(&self) -> f64
Get the current gain reduction in dB (0.0 = no reduction).
Sourcepub fn ceiling_db(&self) -> f64
pub fn ceiling_db(&self) -> f64
Get the ceiling in dB.
Auto Trait Implementations§
impl Freeze for BrickwallLimiter
impl RefUnwindSafe for BrickwallLimiter
impl Send for BrickwallLimiter
impl Sync for BrickwallLimiter
impl Unpin for BrickwallLimiter
impl UnsafeUnpin for BrickwallLimiter
impl UnwindSafe for BrickwallLimiter
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