Skip to main content

OutputAudioBuffers

Struct OutputAudioBuffers 

Source
pub struct OutputAudioBuffers<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> OutputAudioBuffers<'a>

Source

pub fn empty() -> Self

Source

pub fn truncate(&mut self, max_buffer_size: u32)

Shortens the frames_count of these output 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.

Source

pub unsafe fn from_raw_buffers( buffers: &'a mut [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.

Source

pub fn from_plugin_audio(audio: Audio<'a>) -> OutputAudioBuffers<'a>

Available on crate feature clack-plugin only.
Source

pub fn from_plugin_audio_mut(audio: &'a mut Audio<'_>) -> OutputAudioBuffers<'a>

Available on crate feature clack-plugin only.
Source

pub fn as_plugin_audio(&'a mut self) -> Audio<'a>

Available on crate feature clack-plugin only.
Source

pub fn to_plugin_audio(self) -> Audio<'a>

Available on crate feature clack-plugin only.
Source

pub fn as_plugin_audio_with_inputs( &'a mut self, inputs: &InputAudioBuffers<'a>, ) -> Audio<'a>

Available on crate feature clack-plugin only.
Source

pub fn to_plugin_audio_with_inputs( self, inputs: &InputAudioBuffers<'a>, ) -> Audio<'a>

Available on crate feature clack-plugin only.
Source

pub fn as_raw_buffers(&mut self) -> &mut [clap_audio_buffer]

Source

pub fn into_raw_buffers(self) -> &'a mut [clap_audio_buffer]

Source

pub fn port_count(&self) -> u32

The number of port buffers this OutputAudioBuffers has been given.

Source

pub fn frames_count(&self) -> Option<u32>

The number of frames in these output 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.

Source

pub fn port_info(&self, port_index: u32) -> Option<AudioPortProcessingInfo>

Source

pub fn port_infos(&self) -> impl Iterator<Item = AudioPortProcessingInfo> + '_

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.