pub struct FFTConvolver { /* private fields */ }Expand description
High-performance FFT convolver (Overlap-Save algorithm).
Zero-allocation implementation: all scratch buffers are pre-allocated at
construction time so process_into/process_inplace are realtime-safe.
Implementations§
Source§impl FFTConvolver
impl FFTConvolver
Sourcepub fn new(ir_data: &[f64], channels: usize) -> Self
pub fn new(ir_data: &[f64], channels: usize) -> Self
Create a new FFT convolver with the given impulse response
§Arguments
ir_data- Impulse response samples in interleaved format [L0, R0, L1, R1, …]channels- Number of channels
Sourcepub fn reset(&mut self)
pub fn reset(&mut self)
Reset internal state (overlap buffers) Call this when starting a new track to avoid artifacts
Sourcepub fn process_into(&mut self, input: &[f64], output: &mut [f64])
pub fn process_into(&mut self, input: &[f64], output: &mut [f64])
Sourcepub fn process(&mut self, input: &[f64]) -> Vec<f64>
pub fn process(&mut self, input: &[f64]) -> Vec<f64>
Process audio block, returning a new Vec (convenience wrapper)
Note: This method allocates. For real-time use, prefer process_into().
Sourcepub fn process_inplace(&mut self, buf: &mut [f64])
pub fn process_inplace(&mut self, buf: &mut [f64])
Process audio block in-place with zero allocation
Uses internal scratch buffer for temporary storage. This is the recommended method for real-time audio processing.
§Arguments
buf- Input/output samples in interleaved format (modified in place)
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for FFTConvolver
impl !UnwindSafe for FFTConvolver
impl Freeze for FFTConvolver
impl Send for FFTConvolver
impl Sync for FFTConvolver
impl Unpin for FFTConvolver
impl UnsafeUnpin for FFTConvolver
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more