pub struct IrResamplePlan { /* private fields */ }Expand description
Allocation-free shape and timing of a finite IR conversion.
Implementations§
Source§impl IrResamplePlan
impl IrResamplePlan
pub fn new( input_len: usize, input_hz: u32, output_hz: u32, ) -> Result<Self, DspError>
pub fn output_len(&self) -> usize
pub fn leading_output_samples(&self) -> usize
pub fn kernel_bytes(&self) -> usize
Sourcepub fn process<E>(
&self,
sample: impl Fn(usize) -> f64,
check: impl FnMut() -> Result<(), E>,
) -> Result<Vec<f64>, E>
pub fn process<E>( &self, sample: impl Fn(usize) -> f64, check: impl FnMut() -> Result<(), E>, ) -> Result<Vec<f64>, E>
Read samples without an intermediate f32-to-f64 allocation. The reader
supplies the same finite value for a given index throughout this call.
check allows the engine to propagate its own cancellation error.
Trait Implementations§
Source§impl Clone for IrResamplePlan
impl Clone for IrResamplePlan
impl Copy for IrResamplePlan
Auto Trait Implementations§
impl Freeze for IrResamplePlan
impl RefUnwindSafe for IrResamplePlan
impl Send for IrResamplePlan
impl Sync for IrResamplePlan
impl Unpin for IrResamplePlan
impl UnsafeUnpin for IrResamplePlan
impl UnwindSafe for IrResamplePlan
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