| Crates.io | kittyaudio |
| lib.rs | kittyaudio |
| version | 0.2.0 |
| created_at | 2023-11-29 20:48:39.609304+00 |
| updated_at | 2025-01-29 09:03:49.128491+00 |
| description | An audio playback library focusing on simplicity |
| homepage | https://github.com/zeozeozeo/kittyaudio |
| repository | https://github.com/zeozeozeo/kittyaudio |
| max_upload_size | |
| id | 1053541 |
| size | 124,711 |
kittyaudio is a Rust audio playback library focusing on simplicity, speed and low-latency audio playback.
Installation with cargo:
cargo add kittyaudio
use kittyaudio::{include_sound, Mixer};
fn main() {
// include a sound into the executable.
// this type can be cheaply cloned.
let sound = include_sound!("jump.ogg").unwrap();
// create sound mixer
let mut mixer = Mixer::new();
mixer.init(); // use init_ex to specify settings
let playing_sound = mixer.play(sound);
playing_sound.set_volume(0.5); // decrease volume
mixer.wait(); // wait for all sounds to finish
}
panic!() or .unwrap(), always propogate errorsThose features are not implemented yet.