use bevy::ecs::schedule::SystemConfigs; use bevy::prelude::*; use bevy_kira_audio::prelude::*; use bevy_kira_audio::AudioApp; use std::clone::Clone; use std::marker::PhantomData; // This is a bigger example with a GUI for full control over three audio channels fn main() { App::new() .add_plugins((DefaultPlugins, AudioPlugin)) .init_resource::() .add_systems(Startup, prepare_audio_and_ui) .add_systems(Update, create_row_systems::()) .add_systems(Update, create_row_systems::()) .add_systems(Update, create_row_systems::()) .add_audio_channel::() .add_audio_channel::() .add_audio_channel::() .run(); } fn create_row_systems() -> SystemConfigs { ( stop_button::, loop_button::, volume_buttons::, play_sound_button::, play_pause_button::, ) .into_configs() } fn play_pause_button( channel: Res>, mut channel_state: ResMut>, time: Res