Crates.io | raplay |
lib.rs | raplay |
version | 0.3.5 |
source | src |
created_at | 2023-07-30 18:11:30.407593 |
updated_at | 2024-09-02 14:16:42.906614 |
description | Library for playing audio |
homepage | https://github.com/BonnyAD9/raplay |
repository | https://github.com/BonnyAD9/raplay |
max_upload_size | |
id | 930146 |
size | 107,196 |
Library for playing audio.
The library is very new and not much tested.
All the decoding is done by symphonia, so the supported formats are the same as symphonia.
use raplay::{Sink, source::SineSource};
let sink = Sink::default(); // get the default output
let src = SineSource::new(1000.); // create 1000Hz sine source
sink.load(src, true)?; // play the sine wave
use std::fs::File;
use raplay::{Sink, source::Symph};
let sink = Sink::default(); // get the default output
let file = File::open("music.mp3")?; // open the mp3 file
let src = Symph::try_new(file, &Default::default())?; // create a symphonia decoder source
sink.load(src, true)?; // play the mp3 file
It is available on crates.io