Kira is a backend-agnostic library to create expressive audio for games. It provides tweens for smoothly adjusting properties of sounds, a flexible mixer for applying effects to audio, a clock system for precisely timing audio events, and spatial audio support.
Playing a sound multiple times simultaneously:
```rust use kira::{ manager::{ AudioManager, AudioManagerSettings, backend::DefaultBackend, }, sound::static_sound::{StaticSoundData, StaticSoundSettings}, };
// Create an audio manager. This plays sounds and manages resources.
let mut manager = AudioManager::
Gradually speeding up a sound over time:
```rust use std::time::Duration;
use kira::{ manager::{ AudioManager, AudioManagerSettings, backend::DefaultBackend, }, sound::static_sound::{StaticSoundData, StaticSoundSettings}, tween::Tween, };
let mut manager = AudioManager::
Playing a sound with a low-pass filter applied (this makes the audio sound muffled):
```rust use kira::{ manager::{ AudioManager, AudioManagerSettings, backend::DefaultBackend, }, sound::static_sound::{StaticSoundData, StaticSoundSettings}, track::{ TrackBuilder, effect::filter::FilterBuilder, }, };
let mut manager = AudioManager::
Playing sounds in time with a musical beat:
```rust use kira::{ manager::{ AudioManager, AudioManagerSettings, backend::DefaultBackend, }, sound::static_sound::{StaticSoundData, StaticSoundSettings}, clock::ClockSpeed, };
const TEMPO: f64 = 120.0;
let mut manager = AudioManager::
Kira is mainly meant for desktop platforms. Most testing has occurred on Windows, but it has been used successfully used on Mac and Linux.
Kira can also be used in wasm environments with the following limitations:
If you'd like to help improve wasm support, please reach out!
Features I'd like to have:
I'd love for other people to get involved with development! Since the library is still in the early stages, I'm open to all kinds of input - bug reports, feature requests, design critiques, etc. Feel free to open an issue or pull request!
This project is licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in kira
by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.