raplay
Library for playing audio.
The library is very new and not much tested.
Features
- Play(Resume)/Pause
- Callback when audio ends
- Callback for errors
Supported formats
All the decoding is done by symphonia, so the supported formats are the same as symphonia.
Examples
Play a sine wave
use ;
let sink = default_out; // get the default output
let src = new; // create 1000Hz sine source
sink.load?; // play the sine wave
Play a mp3 file
use File;
use ;
let sink = default_out; // get the default output
let file = open?; // open the mp3 file
let src = try_new?; // create a symphonia decoder source
sink.load?; // play the mp3 file
Know issues
- The sound is not clear when playing high sample rates relative to what
is set by the device (192000Hz/41000Hz)
- this has now been fixed with a workaround and should not be problem on most devices