# Bevy Kira audio [![Crates.io](https://img.shields.io/crates/v/bevy_kira_audio.svg)](https://crates.io/crates/bevy_kira_audio) [![docs](https://docs.rs/bevy_kira_audio/badge.svg)](https://docs.rs/bevy_kira_audio) [![license](https://img.shields.io/crates/l/bevy_kira_audio)](https://github.com/NiklasEi/bevy_kira_audio#license) [![Crates.io](https://img.shields.io/crates/d/bevy_kira_audio.svg)](https://crates.io/crates/bevy_kira_audio) This bevy plugin is intended to test an integration of [Kira][kira] into Bevy. The goal is to replace or update `bevy_audio`, if Kira turns out to be a good approach. Currently, this plugin can play `ogg`, `mp3`, `flac`, and `wav` formats and supports web builds. Sound can be played in channels. Each channel has controls to pause or stop playback and can change the volume, playback speed, and panning of all sounds playing in it. You can easily add new channels and access them through Bevy's ECS (see the [`custom_channel` example](examples/custom_channel.rs)). ## Usage *Note: the Bevy feature `audio` is enabled by default and not compatible with this plugin. Make sure to not have the `audio` feature enabled if you want to use `bevy_kira_audio`. Bevy's default features minus `audio` are `"2d", "3d", "ui"`.* To play audio, you usually want to load audio files as assets. This requires `AssetLoaders`. `bevy_kira_audio` comes with loaders for most common audio formats. You can enable them with the features `ogg` (enabled by default), `mp3`, `wav`, or `flac`. The following example assumes that the feature `ogg` is enabled. ```rust no_run use bevy_kira_audio::prelude::*; use bevy::prelude::*; fn main() { App::new() .add_plugins((DefaultPlugins, AudioPlugin)) .add_systems(Startup, start_background_audio) .run(); } fn start_background_audio(asset_server: Res, audio: Res