-
Notifications
You must be signed in to change notification settings - Fork 293
Closed
Description
So it is not playing anything and I just took the code off your docs so idk (and it's not giving me an invalid file or anything not even logging anything)
Kernal: linux
Os: arch
Rodio v: 0.14.0
Cargo v: 1.53.0
Rust v: 2018
// Get a output stream handle to the default physical sound device
let (_stream, stream_handle) = OutputStream::try_default().unwrap();
// Load a sound from a file, using a path relative to Cargo.toml
let file = BufReader::new(File::open("doom.ogg").unwrap());
// Decode that sound file into a source
let source = Decoder::new(file).unwrap();
// Play the sound directly on the device
stream_handle.play_raw(source.convert_samples());
// The sound plays in a separate audio thread,
// so we need to keep the main thread alive while it's playing.
std::thread::sleep(std::time::Duration::from_secs(5));Metadata
Metadata
Assignees
Labels
No labels