Struct ggez::audio::Source
[−]
[src]
pub struct Source { /* fields omitted */ }
A source of audio data connected to a particular Channel
.
Will stop playing when dropped.
Methods
impl Source
[src]
fn new<P: AsRef<Path>>(context: &mut Context, path: P) -> GameResult<Self>
[src]
Create a new Source from the given file.
fn from_data(context: &mut Context, data: SoundData) -> GameResult<Self>
[src]
Creates a new Source using the given SoundData object.
fn play(&self) -> GameResult<()>
[src]
Plays the Source.