[−][src]Trait fon::sample::Sample
Sample - A number of channels.
Associated Types
Loading content...Associated Constants
const CHAN_COUNT: usize
Number of channels
Required methods
fn channels(&self) -> &[Self::Chan]
Get the channels.
fn channels_mut(&mut self) -> &mut [Self::Chan]
Get the channels mutably.
fn from_channels(ch: &[Self::Chan]) -> Self
Make a pixel from a slice of channels.
Provided methods
fn lerp(&self, rhs: Self, t: Self) -> Self
Linear interpolation.
fn blend_sample<O>(dst: &mut [Self], sample: &Self, op: O) where
O: Blend,
O: Blend,
Synthesis of a sample with a slice of samples.
fn blend_slice<O>(dst: &mut [Self], src: &[Self], op: O) where
O: Blend,
O: Blend,
Synthesis of two slices of samples.
fn blend<O>(&mut self, src: &Self, _op: O) where
O: Blend,
O: Blend,
Synthesize two samples together.
fn convert<D>(self) -> D where
D: Sample,
D::Chan: From<Self::Chan> + From<f64>,
D: Sample,
D::Chan: From<Self::Chan> + From<f64>,
Convert a sample to another format.