Add proper error handling
This commit is contained in:
parent
1985c346ac
commit
98b931edff
4 changed files with 117 additions and 27 deletions
|
|
@ -2,7 +2,7 @@ extern crate cpal;
|
|||
|
||||
fn main() {
|
||||
let endpoint = cpal::get_default_endpoint().unwrap();
|
||||
let format = endpoint.get_supported_formats_list().next().unwrap();
|
||||
let format = endpoint.get_supported_formats_list().unwrap().next().unwrap();
|
||||
let mut channel = cpal::Voice::new(&endpoint, &format).unwrap();
|
||||
|
||||
// Produce a sinusoid of maximum amplitude.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue