pub struct Sink { /* private fields */ }
Expand description

Handle to an device that outputs sounds.

Dropping the Sink stops all sounds. You can use detach if you want the sounds to continue playing.

Implementations

Builds a new Sink, beginning playback on a stream.

Builds a new Sink.

Appends a sound to the queue of sounds to play.

Gets the volume of the sound.

The value 1.0 is the “normal” volume (unfiltered input). Any value other than 1.0 will multiply each sample by this value.

Changes the volume of the sound.

The value 1.0 is the “normal” volume (unfiltered input). Any value other than 1.0 will multiply each sample by this value.

Gets the speed of the sound.

The value 1.0 is the “normal” speed (unfiltered input). Any value other than 1.0 will change the play speed of the sound.

Changes the speed of the sound.

The value 1.0 is the “normal” speed (unfiltered input). Any value other than 1.0 will change the play speed of the sound.

Resumes playback of a paused sink.

No effect if not paused.

Pauses playback of this sink.

No effect if already paused.

A paused sink can be resumed with play().

Gets if a sink is paused

Sinks can be paused and resumed using pause() and play(). This returns true if the sink is paused.

Stops the sink by emptying the queue.

Destroys the sink without stopping the sounds that are still playing.

Sleeps the current thread until the sound ends.

Returns true if this sink has no more sounds to play.

Returns the number of sounds currently in the queue.

Trait Implementations

Executes the destructor for this type. 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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.