[][src]Crate rusty_audio

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.

Example

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.
// To actually hear the sound, the process needs to live while the sound plays.
std::thread::sleep(std::time::Duration::from_millis(2000));

Structs

Audio

A simple 4-track audio system to load/decode audio files from disk to play later. Supported formats are: MP3, WAV, Vorbis and Flac.