mirror of
https://github.com/RustAudio/rodio
synced 2024-12-13 13:42:34 +00:00
0988e8c886
* add symphonia decoder * add symphonia-flac * better compile errors * remove unsafe send * update ci * sudo * disable duration check because symphonia does not support it * add error handling * cleanup * update symphonia and fix breaking changes * update to published symphonia version * update docs * reduce namespace duplication * remove extra reference to current frame * pr comments * exclude decoders from module if unused * fix flac test * recommend disabling default features with symphonia
11 lines
333 B
Rust
11 lines
333 B
Rust
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("examples/music.m4a").unwrap();
|
|
sink.append(rodio::Decoder::new(BufReader::new(file)).unwrap());
|
|
|
|
sink.sleep_until_end();
|
|
}
|