Struct nannou_audio::stream::Stream[][src]

pub struct Stream<M> { /* fields omitted */ }
Expand description

A clone-able handle around an audio stream.

Implementations

Command the audio device to start processing this stream.

Calling this will activate capturing/rendering, in turn calling the given audio capture/render function.

Has no effect if the stream is already running.

Command the audio device to stop processing this stream.

Calling this will pause rendering/capturing.

Has no effect is the stream was already paused.

Whether or not the stream is currently playing.

Whether or not the stream is currently paused.

Send the given model update to the audio thread to be applied ASAP.

If the audio is currently rendering, the update will be applied immediately after the function call completes.

If the stream is currently paused, the update will be applied immediately.

Note: This function will be applied on the real-time audio thread so users should avoid performing any kind of I/O, locking, blocking, (de)allocations or anything that may run for an indeterminate amount of time.

The config with which the inner CPAL stream was created.

This should match the actual stream config that is running. If not, there may be a bug in CPAL. However, note that if the sample_format does not match, this just means that nannou is doing a conversion behind the scenes as the hardware itself does not support the target format.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.