//! This example illustrates how to load and play an audio file. //! For loading additional audio formats, you can enable the corresponding feature for that audio format. use bevy::prelude::*; use bevy_kira_components::kira::sound::{PlaybackRate, PlaybackState}; use bevy_kira_components::kira::tween::Tween; use bevy_kira_components::prelude::*; fn main() { App::new() .add_plugins(DefaultPlugins) .add_plugins(AudioPlugin) .add_systems(Startup, setup) .add_systems(Update, (update_speed, pause, volume)) .run(); } fn setup(asset_server: Res, mut commands: Commands) { commands.spawn(( AudioFileBundle { source: asset_server.load("Windless Slopes.ogg"), ..default() }, MyMusic, )); } #[derive(Component)] struct MyMusic; fn update_speed( mut music_controller: Query<&mut AudioHandle, With>, time: Res