Frame

Trait Frame 

Source
pub trait Frame {
    const ZERO: Self;

    // Required methods
    fn channels(&self) -> &[Sample] ;
    fn channels_mut(&mut self) -> &mut [Sample] ;
}
Expand description

A single frame of audio data, encoding one sample for each channel

Required Associated Constants§

Source

const ZERO: Self

A frame with zeroes in every channel

Required Methods§

Source

fn channels(&self) -> &[Sample]

Access the frame’s channels

Source

fn channels_mut(&mut self) -> &mut [Sample]

Mutably access the frame’s channels

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<const N: usize> Frame for [Sample; N]

Source§

const ZERO: Self

Source§

fn channels(&self) -> &[Sample]

Source§

fn channels_mut(&mut self) -> &mut [Sample]

Implementors§

Source§

impl Frame for Sample

Source§

const ZERO: Sample = 0f32