pub struct InputAudioBuffers<'a> { /* private fields */ }Implementations§
Source§impl<'a> InputAudioBuffers<'a>
impl<'a> InputAudioBuffers<'a>
pub const fn empty() -> Self
Sourcepub fn truncate(&mut self, max_buffer_size: u32)
pub fn truncate(&mut self, max_buffer_size: u32)
Shortens the frames_count of these input buffers.
This does not actually change the underlying buffers themselves, it only reduces the slice that will be exposed to the plugin.
This method does nothing if max_buffer_size is greater or equal than the current frames_count.
Sourcepub unsafe fn from_raw_buffers(
buffers: &'a [clap_audio_buffer],
frames_count: u32,
) -> Self
pub unsafe fn from_raw_buffers( buffers: &'a [clap_audio_buffer], frames_count: u32, ) -> Self
§Safety
The caller must ensure all buffer structs are valid for ’a, including all the buffer pointers they contain.
The caller must also ensure frames_count is lower than or equal to the sizes of the
channel buffers pointed to by buffers.
pub fn from_plugin_audio(audio: &Audio<'a>) -> InputAudioBuffers<'a>
clack-plugin only.pub fn as_plugin_audio(&self) -> Audio<'a>
clack-plugin only.pub fn as_raw_buffers(&self) -> &'a [clap_audio_buffer]
Sourcepub fn port_count(&self) -> u32
pub fn port_count(&self) -> u32
The number of port buffers this InputAudioBuffers has been given.
Sourcepub fn frames_count(&self) -> Option<u32>
pub fn frames_count(&self) -> Option<u32>
The number of frames in these input buffers.
This is the minimum frame count of all the port buffers this has been given.
If this has no port buffer (i.e. port_count is zero), this returns None.
pub fn port_info(&self, port_index: u32) -> Option<AudioPortProcessingInfo>
pub fn port_infos(&self) -> impl Iterator<Item = AudioPortProcessingInfo> + '_
Sourcepub fn min_available_frames_with(&self, outputs: &OutputAudioBuffers<'_>) -> u32
pub fn min_available_frames_with(&self, outputs: &OutputAudioBuffers<'_>) -> u32
Returns the minimum number of frames available both in this InputAudioBuffers and
the given OutputAudioBuffers.
This is useful to ensure a safe frame count for a process batch that would receive those
input and output audio buffers.