diff --git a/Cargo.toml b/Cargo.toml index 16917ee..4f23c17 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "kittyaudio" description = "An audio playback library focusing on simplicity" license = "MIT OR BSL-1.0" -version = "0.1.0" +version = "0.1.1" exclude = ["assets/**"] documentation = "https://docs.rs/kittyaudio" homepage = "https://github.com/zeozeozeo/kittyaudio" @@ -10,6 +10,7 @@ repository = "https://github.com/zeozeozeo/kittyaudio" keywords = ["audio", "playback", "gamedev"] categories = ["multimedia"] edition = "2021" +readme = "README.md" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/README.md b/README.md index e7a576f..3d12936 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,17 @@ # 🐱 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/0.1.0/kittyaudio/) | [examples](https://github.com/zeozeozeo/kittyaudio/tree/master/examples) + kittyaudio is a Rust audio playback library focusing on simplicity, speed and low-latency audio playback. +Installation with `cargo`: + +``` +cargo add kittyaudio +``` + # Example ```rust @@ -23,7 +33,7 @@ fn main() { } ``` -# Goals +# Features * Low-latency audio playback * Cross-platform audio playback (including wasm) @@ -31,10 +41,17 @@ fn main() { * Low CPU usage * Minimal dependencies * Minimal memory allocations -* Streaming and in-memory audio playback * 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 and position in the sound with easings + +# Roadmap + +Those features are not implemented yet. + +* Effects (reverb, delay, eq, etc.) +* C API +* Audio streaming from disk diff --git a/src/lib.rs b/src/lib.rs index b969a4a..60074cc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,52 @@ -//! KittyAudio is a Rust audio library focusing on simplicity. -#![warn(missing_docs)] +//! kittyaudio is an audio library focusing on simplicity. +//! +//! # 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 settings +//! +//! let playing_sound = mixer.play(); +//! playing_sound.set_volume(0.5); // decrease volume +//! +//! mixer.wait(); // wait for all sounds to finish +//! } +//! ``` +//! +//! See more examples in the `examples` directory. +//! +//! # 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 and position in the sound with easings +//! +//! # Roadmap +//! +//! Those features are not implemented yet. +//! +//! * Effects (reverb, delay, eq, etc.) +//! * C API +//! * Audio streaming from disk + +#![warn(missing_docs)] // warn on missing function docs #[cfg(feature = "playback")] mod backend;