Crate bevy_audio[−][src]
Expand description
Audio support for the game engine Bevy
fn main() {
App::new()
.add_plugins(MinimalPlugins)
.add_plugin(AssetPlugin)
.add_plugin(AudioPlugin)
.add_startup_system(play_background_audio)
.run();
}
fn play_background_audio(asset_server: Res<AssetServer>, audio: Res<Audio>) {
audio.play(asset_server.load("background_audio.ogg"));
}
Modules
Structs
Use this resource to play audio
Loads files as AudioSource
Assets
Used internally to play audio on the current “audio device”
Adds support for audio playback to a Bevy Application
A source of audio data
Traits
A type implementing this trait can be decoded as a rodio source
Functions
Plays audio currently queued in the Audio
resource through the AudioOutput
resource