rodio
rodio copied to clipboard
no sound output on osx
Ran into this today also on macos.
extern crate rodio;
use std::fs::File;
use std::io::BufReader;
use rodio::Source;
fn main() {
let endpoint = rodio::get_default_endpoint().unwrap();
let sink = rodio::Sink::new(&endpoint);
let file = File::open("sound.wav").unwrap();
let source = rodio::Decoder::new(BufReader::new(file)).unwrap();
sink.append(source);
sink.play();
sink.sleep_until_end();
}
Produces no audio output, & sleeps forever (Audio file is 1s long.)
Anything else I can provide to help debug?
Try following https://github.com/tomaka/cpal/issues/148
Also experiencing this. This is unrelated to tomaka/cpal#148 as far as I can tell. Even after testing with this fix, there is no sound.
If rodio doesn't output any sound, then it's a bug in cpal. Rodio uses cpal in the way it's intended to be used.
This seems to be caused by a change in tomaka/cpal#136 if I revert the changes, rodio outputs sound