pub struct InputChannels<'a, S> { /* private fields */ }Expand description
An InputPort’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
InputPort::channels.
Implementations§
Source§impl<'a, S> InputChannels<'a, S>
impl<'a, S> InputChannels<'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.
Sourcepub fn raw_data(&self) -> &'a [*mut S]
pub fn raw_data(&self) -> &'a [*mut S]
Returns the raw pointer data, as provided by the host.
In CLAP’s API, hosts provide a port’s audio data as an array of raw pointers, each of which points
to the start of a sample array of type S and of frames_count length.
Sourcepub fn channel_count(&self) -> u32
pub fn channel_count(&self) -> u32
The number of channels.
Sourcepub fn channel(&self, channel_index: u32) -> Option<&'a [S]>
pub fn channel(&self, channel_index: u32) -> Option<&'a [S]>
Retrieves the sample buffer of the channel at a given index.
If there is no channel at the given index (i.e. channel_index is greater or equal than
channel_count), this returns None.
Sourcepub fn iter(&self) -> InputChannelsIter<'a, S> ⓘ
pub fn iter(&self) -> InputChannelsIter<'a, S> ⓘ
Gets an iterator over all the port’s channels’ sample buffers.
Trait Implementations§
Source§impl<'a, S: Clone> Clone for InputChannels<'a, S>
impl<'a, S: Clone> Clone for InputChannels<'a, S>
Source§fn clone(&self) -> InputChannels<'a, S>
fn clone(&self) -> InputChannels<'a, S>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more