Struct amethyst_audio::output::Output [−][src]
pub struct Output { /* fields omitted */ }A speaker(s) through which audio can be played.
By convention, the default output is stored as a resource in the World.
Methods
impl Output[src]
impl Outputpub fn name(&self) -> String[src]
pub fn name(&self) -> StringGets the name of the output
pub fn try_play_once(
&self,
source: &Source,
volume: f32
) -> Result<(), DecoderError>[src]
pub fn try_play_once(
&self,
source: &Source,
volume: f32
) -> Result<(), DecoderError>Play a sound once. A volume of 1.0 is unchanged, while 0.0 is silent.
This will return an Error if the loaded audio file in source could not be decoded.
pub fn play_once(&self, source: &Source, volume: f32)[src]
pub fn play_once(&self, source: &Source, volume: f32)Play a sound once. A volume of 1.0 is unchanged, while 0.0 is silent.
This may silently fail, in order to get error information use try_play_once.
pub fn play_n_times(&self, source: &Source, volume: f32, n: u16)[src]
pub fn play_n_times(&self, source: &Source, volume: f32, n: u16)Play a sound n times. A volume of 1.0 is unchanged, while 0.0 is silent.
This may silently fail, in order to get error information use try_play_n_times.
pub fn try_play_n_times(
&self,
source: &Source,
volume: f32,
n: u16
) -> Result<(), DecoderError>[src]
pub fn try_play_n_times(
&self,
source: &Source,
volume: f32,
n: u16
) -> Result<(), DecoderError>Play a sound n times. A volume of 1.0 is unchanged, while 0.0 is silent.
This will return an Error if the loaded audio file in source could not be decoded.
Trait Implementations
impl Clone for Output[src]
impl Clone for Outputfn clone(&self) -> Output[src]
fn clone(&self) -> OutputReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Eq for Output[src]
impl Eq for Outputimpl PartialEq for Output[src]
impl PartialEq for Outputfn eq(&self, other: &Output) -> bool[src]
fn eq(&self, other: &Output) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Output) -> bool[src]
fn ne(&self, other: &Output) -> boolThis method tests for !=.
impl Debug for Output[src]
impl Debug for Output