Trait rsynth::backend::combined::AudioReader[][src]

pub trait AudioReader<S> where
    S: Copy
{ type Err; fn number_of_channels(&self) -> usize;
fn frames_per_second(&self) -> u64;
fn fill_buffer(
        &mut self,
        output: &mut AudioBufferOut<'_, '_, S>
    ) -> Result<usize, Self::Err>; }

Define how audio is read.

This trait is generic over S, which represents the data-type used for a sample.

Associated Types

type Err[src]

The type of the error that occurs when reading data.

Loading content...

Required methods

fn number_of_channels(&self) -> usize[src]

The number of audio channels that can be read.

fn frames_per_second(&self) -> u64[src]

The sampling frequency in frames per second.

fn fill_buffer(
    &mut self,
    output: &mut AudioBufferOut<'_, '_, S>
) -> Result<usize, Self::Err>
[src]

Fill the buffers. Return the number of frames that have been read and written to the buffer. If the return value is < the number of frames in the input, no more frames can be expected.

Loading content...

Implementors

impl<'b, S> AudioReader<S> for TestAudioReader<'b, S> where
    S: Copy
[src]

type Err = Infallible

impl<'wr, S> AudioReader<S> for HoundAudioReader<'wr, S> where
    S: Copy + FromSample<f32> + FromSample<i32> + FromSample<i16>, 
[src]

type Err = Error

impl<S> AudioReader<S> for AudioDummy<S> where
    S: Copy
[src]

type Err = Infallible

impl<S, T> AudioReader<S> for AudioChunkReader<S, T> where
    T: Borrow<AudioChunk<S>>,
    S: Copy
[src]

type Err = Infallible

Loading content...