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.
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.
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.
Sleeps the current thread until the sound ends.