Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zeozeozeo/kittyaudio
A Rust audio playback library focusing on simplicity.
https://github.com/zeozeozeo/kittyaudio
audio audio-playback cpal gamedev low-latency multimedia playback rustlang symphonia
Last synced: 26 days ago
JSON representation
A Rust audio playback library focusing on simplicity.
- Host: GitHub
- URL: https://github.com/zeozeozeo/kittyaudio
- Owner: zeozeozeo
- License: bsl-1.0
- Created: 2023-11-27T12:26:34.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2024-02-06T18:20:35.000Z (9 months ago)
- Last Synced: 2024-09-29T20:41:20.297Z (about 1 month ago)
- Topics: audio, audio-playback, cpal, gamedev, low-latency, multimedia, playback, rustlang, symphonia
- Language: Rust
- Homepage: https://docs.rs/kittyaudio
- Size: 1.96 MB
- Stars: 12
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE-BSL-1.0
Awesome Lists containing this project
README
# 🐱 kittyaudio
![docs.rs](https://img.shields.io/docsrs/kittyaudio) ![Downloads on Crates.io](https://img.shields.io/crates/d/kittyaudio)
#### [crates.io](https://crates.io/crates/kittyaudio) | [docs.rs](https://docs.rs/kittyaudio) | [examples](https://github.com/zeozeozeo/kittyaudio/tree/master/examples) | [changelogs](https://github.com/zeozeozeo/kittyaudio/blob/master/CHANGELOG.md)
kittyaudio is a Rust audio playback library focusing on simplicity, speed and low-latency audio playback.
Installation with `cargo`:
```
cargo add kittyaudio
```# Example
```rust
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 settingslet playing_sound = mixer.play(sound);
playing_sound.set_volume(0.5); // decrease volumemixer.wait(); // wait for all sounds to finish
}
```# Features
* Low-latency audio playback
* Cross-platform audio playback (including wasm)
* Handle device changes or disconnects in real time
* Low CPU usage
* Minimal dependencies
* Minimal memory allocations
* No `panic!()` or `.unwrap()`, always propogate errors
* No unsafe code
* Simple API, while being customizable
* Optionally use [Symphonia](https://github.com/pdeljanov/Symphonia) to support most audio formats
* Feature to disable audio playback support, if you want to use kittyaudio purely as an audio library
* Commands to change volume, playback rate, position and panning in the sound with easings
* Loops, and commands to change them with easings# Roadmap
Those features are not implemented yet.
* Effects (reverb, delay, eq, etc.)
* C API
* Audio streaming from disk