pub struct PairedChannels<'a, S> { /* private fields */ }Expand description
An PortPair’s channels’ data buffers, which contains samples of a given type S.
The sample type S is always going to be either f32 or f64, as returned by
PortPair::channels.
Implementations§
Source§impl<'a, S> PairedChannels<'a, S>
impl<'a, S> PairedChannels<'a, S>
Sourcepub fn frames_count(&self) -> u32
pub fn frames_count(&self) -> u32
Returns the number of frames to process in this block.
This will always match the number of samples of every audio channel buffer, from both the input and output port.
Sourcepub fn input_channel_count(&self) -> usize
pub fn input_channel_count(&self) -> usize
The number of input channels.
Sourcepub fn output_channel_count(&self) -> usize
pub fn output_channel_count(&self) -> usize
The number of output channels.
Sourcepub fn channel_pair_count(&self) -> usize
pub fn channel_pair_count(&self) -> usize
The total number of channel pairs.
Since there may be more channels in one port than in the other, this method also counts
the partial ChannelPairs that can be returned, and therefore returns the maximum number
of channels between the input and output ports.
Sourcepub fn channel_pair(&mut self, index: usize) -> Option<ChannelPair<'a, S>>
pub fn channel_pair(&mut self, index: usize) -> Option<ChannelPair<'a, S>>
Retrieves the pair of sample buffers for the pair of channels at a given index.
If there is no channel at the given index (i.e. channel_index is greater or equal than
channel_pair_count), this returns None.
See ChannelPair’s documentation for examples on how to access sample buffers from it.
Sourcepub fn iter_mut(&mut self) -> PairedChannelsIter<'_, S> ⓘ
pub fn iter_mut(&mut self) -> PairedChannelsIter<'_, S> ⓘ
Gets an iterator over all the ports’ ChannelPairs.