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 resouce in the World
.
Methods
impl Output
[src]
fn name(&self) -> String
[src]
Gets the name of the output
fn try_play_once(
&self,
source: &Source,
volume: f32
) -> Result<(), DecoderError>
[src]
&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.
fn play_once(&self, source: &Source, volume: f32)
[src]
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
.
fn play_n_times(&self, source: &Source, volume: f32, n: u16)
[src]
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
.
fn try_play_n_times(
&self,
source: &Source,
volume: f32,
n: u16
) -> Result<(), DecoderError>
[src]
&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.