[][src]Trait fon::Stream

pub trait Stream<F: Frame>: Sized + IntoIterator<Item = F> {
    pub fn sample_rate(&self) -> Option<f64>;
pub fn len(&self) -> Option<usize>; pub fn is_empty(&self) -> bool { ... }
pub fn set_sample_rate<R: Into<f64>>(&mut self, sr: R) { ... }
pub fn take(self, samples: usize) -> TakeStream<F, Self> { ... }
pub fn blend<G: Frame, M: Stream<G>, O: Blend>(
        self,
        other: M,
        op: O
    ) -> BlendStream<F, G, Self, M, O> { ... } }

Audio stream - a type that generates audio samples.

Required methods

pub fn sample_rate(&self) -> Option<f64>[src]

Get the (source) sample rate of the stream.

pub fn len(&self) -> Option<usize>[src]

Returns the length of the stream exactly. None represents an infinite iterator.

Loading content...

Provided methods

pub fn is_empty(&self) -> bool[src]

Check if the stream is empty (will not produce any frames).

pub fn set_sample_rate<R: Into<f64>>(&mut self, sr: R)[src]

Set the source sample rate of the stream. Will usually panic (default behavior), unless the stream is configurable.

pub fn take(self, samples: usize) -> TakeStream<F, Self>[src]

Take at most samples samples as a stream.

pub fn blend<G: Frame, M: Stream<G>, O: Blend>(
    self,
    other: M,
    op: O
) -> BlendStream<F, G, Self, M, O>
[src]

Blend this stream with another.

Panics

If the sample rates are not compatible.

Loading content...

Implementors

impl<F: Frame> Stream<F> for &Audio<F>[src]

impl<T: Frame> Stream<T> for T[src]

Loading content...