pub struct ProcBuffers<'a, 'b> {
pub inputs: &'a [&'b [f32]],
pub outputs: &'a mut [&'b mut [f32]],
}Expand description
The buffers used in AudioNodeProcessor::process
Fields§
§inputs: &'a [&'b [f32]]The audio input buffers.
The number of channels will always equal the ChannelConfig::num_inputs
value that was returned in AudioNode::info.
Each channel slice will have a length of ProcInfo::frames.
outputs: &'a mut [&'b mut [f32]]The audio output buffers.
WARNING: The node MUST either completely fill all output buffers
with data, or return ProcessStatus::ClearAllOutputs/ProcessStatus::Bypass.
Failing to do this will result in audio glitches.
The number of channels will always equal the ChannelConfig::num_outputs
value that was returned in AudioNode::info.
Each channel slice will have a length of ProcInfo::frames.
These buffers may contain junk data.
Implementations§
Source§impl<'a, 'b> ProcBuffers<'a, 'b>
impl<'a, 'b> ProcBuffers<'a, 'b>
Sourcepub fn check_for_silence_on_outputs(&self, amp_epsilon: f32) -> ProcessStatus
pub fn check_for_silence_on_outputs(&self, amp_epsilon: f32) -> ProcessStatus
Thouroughly checks if all output buffers contain silence (as in all
samples have an absolute amplitude less than or equal to amp_epsilon).
If all buffers are silent, then ProcessStatus::ClearAllOutputs will
be returned. Otherwise, ProcessStatus::OutputsModified will be
returned.
Trait Implementations§
Auto Trait Implementations§
impl<'a, 'b> Freeze for ProcBuffers<'a, 'b>
impl<'a, 'b> RefUnwindSafe for ProcBuffers<'a, 'b>
impl<'a, 'b> Send for ProcBuffers<'a, 'b>
impl<'a, 'b> Sync for ProcBuffers<'a, 'b>
impl<'a, 'b> Unpin for ProcBuffers<'a, 'b>
impl<'a, 'b> !UnwindSafe for ProcBuffers<'a, 'b>
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.