Struct gate::Audio [−][src]
pub struct Audio<A: AppAssetId> { /* fields omitted */ }
Struct for audio playback.
Methods
impl<A: AppAssetId> Audio<A>
[src]
impl<A: AppAssetId> Audio<A>
pub fn play_sound(&mut self, sound: A::Sound)
[src]
pub fn play_sound(&mut self, sound: A::Sound)
Plays the given sound effect once.
pub fn loop_music(&mut self, music: A::Music)
[src]
pub fn loop_music(&mut self, music: A::Music)
Continually loops the given music, replacing the currently playing music, if any.
pub fn stop_music(&mut self)
[src]
pub fn stop_music(&mut self)
Stops the currently playing music, if any.