[][src]Struct nannou_audio::stream::output::Builder

pub struct Builder<M, FA, FB, S = f32> {
    pub builder: Builder<M, S>,
    pub render: Render<FA, FB>,
}

A type used for building an output stream.

Fields

builder: Builder<M, S>render: Render<FA, FB>

Methods

impl<M, FA, FB, S> Builder<M, FA, FB, S>[src]

pub fn render<G>(
    self,
    render: G
) -> Builder<M, G, DefaultRenderResultFn<M, S>, S>
[src]

Specify the render function to use for rendering the model to the buffer.

If you wish to handle errors produced by the stream, you should use render_result instead and ensure your render function accepts a output::Result<S> rather than a &mut Buffer<S>.

Please note that only one render or render_result function may be submitted. Only the last function submitted will be used.

pub fn render_result<G>(
    self,
    render_result: G
) -> Builder<M, DefaultRenderFn<M, S>, G, S>
[src]

Specify a function for processing render stream results.

Please note that only one render or render_result function may be submitted. Only the last function submitted will be used.

pub fn sample_rate(self, sample_rate: u32) -> Self[src]

pub fn channels(self, channels: usize) -> Self[src]

pub fn device(self, device: Device) -> Self[src]

pub fn frames_per_buffer(self, frames_per_buffer: usize) -> Self[src]

pub fn build(self) -> Result<Stream<M>, BuildError> where
    S: 'static + Send + Sample + ToSample<u16> + ToSample<i16> + ToSample<f32>,
    M: 'static + Send,
    FA: 'static + RenderFn<M, S> + Send,
    FB: 'static + RenderResultFn<M, S> + Send
[src]

Auto Trait Implementations

impl<M, FA, FB, S = f32> !Sync for Builder<M, FA, FB, S>

impl<M, FA, FB, S> Send for Builder<M, FA, FB, S> where
    FA: Send,
    FB: Send,
    M: Send,
    S: Send

impl<M, FA, FB, S> Unpin for Builder<M, FA, FB, S> where
    FA: Unpin,
    FB: Unpin,
    M: Unpin,
    S: Unpin

impl<M, FA, FB, S = f32> !RefUnwindSafe for Builder<M, FA, FB, S>

impl<M, FA, FB, S = f32> !UnwindSafe for Builder<M, FA, FB, S>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<S> FromSample<S> for S[src]

impl<T, U> ToSample<U> for T where
    U: FromSample<T>, 
[src]

impl<S, T> Duplex<S> for T where
    T: FromSample<S> + ToSample<S>, 
[src]