Trait ao::auto::SampleBuffer [-]  [+] [src]

pub trait SampleBuffer {
    fn channels(&self) -> usize;
    fn sample_rate(&self) -> usize;
    fn endianness(&self) -> Endianness;
    fn sample_width(&self) -> usize;
    fn data<'a>(&self) -> &'a [u8];
}

A buffer containing samples.

Such buffer always has a defined number of channels and sample rate, in addition to the parameters normally provided in a SampleFormat specification.

Required Methods

fn channels(&self) -> usize

Number of channels in this buffer.

fn sample_rate(&self) -> usize

Sample rate of this buffer, in Hz.

fn endianness(&self) -> Endianness

Endianness of samples in this buffer.

fn sample_width(&self) -> usize

Bit width of samples in this buffer.

fn data<'a>(&self) -> &'a [u8]

Provides access to the sample data.

No processing is performed on this data; it is passed straight through to the underlying library.

Implementors