Correctly enumerate audio devices (core + wasapi)

This commit is contained in:
Pierre Krieger 2015-09-01 11:23:41 +02:00
parent 659aeba42d
commit 47f966bf75
7 changed files with 457 additions and 241 deletions

View file

@ -1,7 +1,7 @@
extern crate cpal;
fn main() {
let mut channel = cpal::Voice::new();
let mut channel = cpal::Voice::new(&cpal::get_default_endpoint().unwrap()).unwrap();
// Produce a sinusoid of maximum amplitude.
let mut data_source = (0u64..).map(|t| t as f32 * 0.03)