pub struct ConvolverNode { /* private fields */ }Expand description
A node that performs real-time convolution against an Impulse Response (IR).
Convolver is used for effects like reverb, speaker modeling, or virtual acoustics. It uses a partitioned convolution algorithm with background worker threads to achieve low-latency performance even with long IRs.
Implementations§
Source§impl ConvolverNode
impl ConvolverNode
Sourcepub fn from_file(
path: &str,
target_sample_rate: u32,
max_len: Option<usize>,
) -> Result<Self>
pub fn from_file( path: &str, target_sample_rate: u32, max_len: Option<usize>, ) -> Result<Self>
Creates a ConvolverNode by loading an Impulse Response (IR) from a WAV file.
§Parameters
path: Path to the WAV file.target_sample_rate: Target sample rate for processing.max_len: Optional maximum length (in samples) to truncate the IR.
Sourcepub fn from_file_with_config(
path: &str,
target_sample_rate: u32,
max_len: Option<usize>,
config: ConvolverConfig,
) -> Result<Self>
pub fn from_file_with_config( path: &str, target_sample_rate: u32, max_len: Option<usize>, config: ConvolverConfig, ) -> Result<Self>
Creates a ConvolverNode from a WAV file with custom configuration.
pub fn new(ir: &[[f32; 2]]) -> Self
pub fn with_config(ir: &[[f32; 2]], config: ConvolverConfig) -> Self
pub fn process(&mut self, input: Option<&AudioUnit>, output: &mut AudioUnit)
pub fn get_drop_count(&self) -> usize
Sourcepub fn clone_drop_count(&self) -> Arc<AtomicUsize>
pub fn clone_drop_count(&self) -> Arc<AtomicUsize>
Returns a shared reference to the drop count.
Drop count increases when the convolution worker threads fall behind the real-time audio thread.
Auto Trait Implementations§
impl Freeze for ConvolverNode
impl !RefUnwindSafe for ConvolverNode
impl Send for ConvolverNode
impl Sync for ConvolverNode
impl Unpin for ConvolverNode
impl UnsafeUnpin for ConvolverNode
impl !UnwindSafe for ConvolverNode
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