dynwave
dynwave is a dynamic audio player based on fixed samples stream, written in Rust.
The purpose of this is to implement a cross platform audio player that plays audio samples stream generated and plays it real-time.
This is useful for emulators for example, where an emulation loop will be like this:
- Run emulation for a frame.
- Extract the collected audio samples for that frame.
- Queue the samples for playing (using
dynwave
). - Take video frame and display it.
- Repeat.
Users of dynwave
If you are using
dynwave
in your project, please open a PR to add it here.
Project | Description |
---|---|
mizu | A GameBoy emulator written in Rust |
trapezoid | PSX emulator powered with Vulkan and Rust |
Getting Started
You can use dynwave
to play audio streams for your Rust projects.
Cargo
Add it as a dependency in your Cargo.toml
file:
Example usage
use ;
let mut player = new.unwrap;
// Start playing the audio
player.play.unwrap;
// generate audio samples (can be done in a emulation loop for example)
let samples = generate_samples;
player.queue;
// pause the audio
player.pause.unwrap;
License
This project is licensed under the MIT License - see the LICENSE file for details