Kira is a backend-agnostic library to create expressive audio for games. It provides parameters for smoothly adjusting properties of sounds, a flexible mixer for applying effects to audio, and a clock system for precisely timing audio events.
```rust use kira::{ manager::{ AudioManager, AudioManagerSettings, backend::cpal::CpalBackend, }, sound::static_sound::{StaticSoundData, StaticSoundSettings}, };
// Create an audio manager. This plays sounds and manages resources.
let mut manager = AudioManager::
```rust use std::time::Duration;
use kira::{ manager::{ AudioManager, AudioManagerSettings, backend::cpal::CpalBackend, }, sound::static_sound::{StaticSoundData, StaticSoundSettings}, tween::Tween, };
let mut manager = AudioManager::
This makes the audio sound muffled.
```rust use kira::{ manager::{ AudioManager, AudioManagerSettings, backend::cpal::CpalBackend, }, sound::static_sound::{StaticSoundData, StaticSoundSettings}, track::{ TrackBuilder, effect::filter::FilterBuilder, }, };
let mut manager = AudioManager::
```rust use kira::{ manager::{ AudioManager, AudioManagerSettings, backend::cpal::CpalBackend, }, sound::static_sound::{StaticSoundData, StaticSoundSettings}, 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 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:
To run one of the examples, run this command from the root directory of the repo:
cargo run -p [example_name]
Where [example_name]
is the name of one of the folders in crates/examples
(besides the "assets" folder).
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.