pub struct ImpulseResponse {
pub sample_rate: u32,
pub channels: Vec<Vec<f32>>,
}Expand description
Decoded impulse response audio data.
Samples are stored per-channel, interleaving is handled by consumers.
Fields§
§sample_rate: u32§channels: Vec<Vec<f32>>Implementations§
Source§impl ImpulseResponse
impl ImpulseResponse
Sourcepub fn channel_count(&self) -> usize
pub fn channel_count(&self) -> usize
Return the number of channels contained in the impulse response.
Sourcepub fn channel_for_output(&self, index: usize) -> &[f32]
pub fn channel_for_output(&self, index: usize) -> &[f32]
Select a channel to use for the requested output index.
Multi-channel IRs are wrapped (round-robin). Mono IRs are reused for all outputs.
Trait Implementations§
Source§impl Clone for ImpulseResponse
impl Clone for ImpulseResponse
Source§fn clone(&self) -> ImpulseResponse
fn clone(&self) -> ImpulseResponse
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ImpulseResponse
impl RefUnwindSafe for ImpulseResponse
impl Send for ImpulseResponse
impl Sync for ImpulseResponse
impl Unpin for ImpulseResponse
impl UnwindSafe for ImpulseResponse
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