Crates.io | kittyaudio |
lib.rs | kittyaudio |
version | 0.1.9 |
source | src |
created_at | 2023-11-29 20:48:39.609304 |
updated_at | 2024-02-06 18:22:05.569939 |
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 | 122,276 |
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.