Rusty Audio Playback Library
rusty_audio
is a fun and easy audio playback library that provides a 4-track audio system to
load/decode audio files and play them, perfect for small projects. It is also well-suited for
training purposes, and is featured in the Ultimate Rust Crash Course on Udemy.
- Formats: MP3, WAV, Vorbis and Flac.
- Platforms: Supports macOS, Windows, and iOS out of the box. Linux requires installation of extra dependencies.
This library uses the rodio audio playback library under the hood, which you should consider using directly if your needs are more complex.
Example
# Add this to your [dependencies] section in Cargo.toml
= "1.2.1"
// main.rs
use Audio;
Built-in Example
You can run the built-in example by cloning this repository, and then running:
$ cargo run --example play
Dependencies on Linux
For Linux, the CPAL package that is used under the hood requires the alsa development libraries to be installed.
CentOS
Debian/Ubuntu
Contribution
All contributions are assumed to be dual-licensed under MIT/Apache-2.
License
Distributed under the terms of both the MIT license and the Apache License (Version 2.0).
See license/APACHE and license/MIT.
Sponsor
If you like Rusty Audio, please consider sponsoring me on GitHub. 💖