Skip to main content

Interleaved

Struct Interleaved 

Source
pub struct Interleaved<T: Sample> { /* private fields */ }
Expand description

Use interleaved output packets for a PacketResampler.

Trait Implementations§

Source§

impl<T: Sample> PacketResamplerBuffer<T> for Interleaved<T>

Source§

type Output = [T]

Source§

fn new(channels: usize, input_frames: usize, output_frames: usize) -> Self

Source§

fn output(&self, frames: usize) -> &Self::Output

Source§

fn resample( &mut self, indexing: Option<&Indexing>, resampler: &mut Box<dyn Resampler<T>>, ) -> ResampleResult<(usize, usize)>

Source§

fn copy_from_other_to_input_channel( &mut self, other: &dyn Adapter<T>, other_channel: usize, self_channel: usize, other_skip: usize, self_skip: usize, take: usize, ) -> Option<usize>

Copy values from a channel of another Adapter. The self_skip and other_skip arguments are the offsets in frames for where copying starts in the two channels. The method copies take values. Read more
Source§

fn input_fill_frames_with( &mut self, start: usize, count: usize, value: &T, ) -> Option<usize>

Write the provided value to every sample in a range of frames. Can be used to clear a range of frames by writing zeroes, or to initialize each sample to a certain value. Returns None if called with a too large range.
Source§

fn input_fill_with(&mut self, value: &T)

Write the provided value to every sample in the entire buffer. Can be used to clear a buffer by writing zeroes, or to initialize each sample to a certain value.
Source§

fn output_copy_frames_within(&mut self, src: usize, dest: usize, count: usize)

Copy frames within the buffer. Copying is performed for all channels. Copies count frames, from the range src..src+count, to the range dest..dest+count. The two regions are allowed to overlap. The default implementation copies by calling the read and write methods, while type specific implementations can use more efficient methods.

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, <T as TryFrom<U>>::Error>

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.