6 stable releases
✓ Uses Rust 2018 edition
|new 1.1.4||Mar 25, 2020|
|1.1.3||Mar 15, 2020|
|1.1.1||Nov 20, 2019|
|1.1.0||Oct 10, 2019|
|1.0.0||Oct 10, 2019|
#84 in Audio
55 downloads per month
Used in 2 crates
rusty_audio is a fun and easy audio library that provides a 4-track audio system to load/decode
audio files and play them. Supported formats are: MP3, WAV, Vorbis and Flac.
This library is part of the
rusty_engine game engine, but can be used as a standalone library as
well. It uses the very powerful rodio audio playback library under the hood, which you should
consider using directly if your needs are more complex.
rusty_audio should work out-of-the-box on macOS, Windows, iOS, and emscripten. For Linux, the
downstream package for actually playing sound (CPAL requires
the alsa development libraries to be installed.
sudo yum install -y alsa-lib-devel
sudo apt install libasound2-dev
rusty_audio is a convenient sound library for small projects and educational purposes. For
more elaborate needs, please use rodio, which is the much
more powerful audio library that this one uses.
use rusty_audio::Audio; let mut audio = Audio::new(); audio.add("startup", "audio_subsystem_initialized.mp3"); audio.play("startup"); // Execution continues while playback occurs in another thread. audio.wait(); // Block until no sounds are playing