Struct amethyst_audio::AudioSink [−][src]
pub struct AudioSink { /* fields omitted */ }This structure provides a way to programmatically pick and play music.
Methods
impl AudioSink[src]
impl AudioSinkpub fn new(output: &Output) -> AudioSink[src]
pub fn new(output: &Output) -> AudioSinkCreates a new AudioSink using the given audio output.
pub fn append(&self, source: &Source) -> Result<(), DecoderError>[src]
pub fn append(&self, source: &Source) -> Result<(), DecoderError>Adds a source to the sink's queue of music to play.
pub fn empty(&self) -> bool[src]
pub fn empty(&self) -> boolReturns true if the sink has no more music to play.
pub fn volume(&self) -> f32[src]
pub fn volume(&self) -> f32Retrieves the volume of the sink, between 0.0 and 1.0;
pub fn set_volume(&mut self, volume: f32)[src]
pub fn set_volume(&mut self, volume: f32)Sets the volume of the sink.
pub fn play(&self)[src]
pub fn play(&self)Resumes playback of a paused sink. Has no effect if this sink was never paused.
pub fn pause(&self)[src]
pub fn pause(&self)Pauses playback, this can be resumed with AudioSink::play
pub fn is_paused(&self) -> bool[src]
pub fn is_paused(&self) -> boolReturns true if the sink is currently paused.
pub fn stop(&self)[src]
pub fn stop(&self)Empties the sink's queue of all music.