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