perf(rodio): reduce control polling during playback

This commit is contained in:
vicrodh committed 2026-01-13 00:27:03 -06:00
1 parent 3c1c598e34
commit 1e6a8b1aee
70 files changed
+9378

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
use std::io::BufReader;
fn main() {
let (_stream, handle) = rodio::OutputStream::try_default().unwrap();
let sink = rodio::Sink::try_new(&handle).unwrap();
let file = std::fs::File::open("assets/music.mp3").unwrap();
sink.append(rodio::Decoder::new(BufReader::new(file)).unwrap());
sink.sleep_until_end();
}