Struct xsynth_core::effects::VolumeLimiter
source · pub struct VolumeLimiter { /* private fields */ }
Expand description
A multi-channel audio limiter.
Can be useful to prevent clipping on loud audio.
Implementations§
source§impl VolumeLimiter
impl VolumeLimiter
sourcepub fn new(channel_count: u16) -> VolumeLimiter
pub fn new(channel_count: u16) -> VolumeLimiter
Initializes a new audio limiter with a specified audio channel count.
sourcepub fn limit(&mut self, sample: &mut [f32])
pub fn limit(&mut self, sample: &mut [f32])
Applies the limiting algorithm to the given sample buffer to prevent clipping.
pub fn limit_iter<'a, 'b, T: 'b + Iterator<Item = f32>>( &'a mut self, samples: T, ) -> VolumeLimiterIter<'a, 'b, T> ⓘ
Auto Trait Implementations§
impl Freeze for VolumeLimiter
impl RefUnwindSafe for VolumeLimiter
impl Send for VolumeLimiter
impl Sync for VolumeLimiter
impl Unpin for VolumeLimiter
impl UnwindSafe for VolumeLimiter
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