[−][src]Struct nannou_audio::stream::output::Builder
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]
self,
render: G
) -> Builder<M, G, DefaultRenderResultFn<M, S>, S>
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]
self,
render_result: G
) -> Builder<M, DefaultRenderFn<M, S>, G, S>
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]
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,
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,
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,
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]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<S> FromSample<S> for S
[src]
fn from_sample_(s: S) -> S
[src]
impl<T, U> ToSample<U> for T where
U: FromSample<T>,
[src]
U: FromSample<T>,
fn to_sample_(self) -> U
[src]
impl<S, T> Duplex<S> for T where
T: FromSample<S> + ToSample<S>,
[src]
T: FromSample<S> + ToSample<S>,