QDH: Instantiate audio backend immediately when using "--device ?".

This commit is contained in:
Will Stott 2018-11-15 21:46:26 +00:00
parent ac9423d9d9
commit b81bdca707

View file

@ -200,6 +200,10 @@ fn setup(args: &[String]) -> Setup {
let backend = audio_backend::find(backend_name).expect("Invalid backend"); let backend = audio_backend::find(backend_name).expect("Invalid backend");
let device = matches.opt_str("device"); let device = matches.opt_str("device");
if device == Some("?".into()) {
backend(device);
exit(0);
}
let mixer_name = matches.opt_str("mixer"); let mixer_name = matches.opt_str("mixer");
let mixer = mixer::find(mixer_name.as_ref()).expect("Invalid mixer"); let mixer = mixer::find(mixer_name.as_ref()).expect("Invalid mixer");