Add SupportedFormat (#168)

This commit is contained in:
tomaka 2017-10-20 21:18:40 +02:00 • committed by GitHub
parent 393206bde9
commit 87949d859b
9 changed files with 75 additions and 30 deletions

View file

@ -6,7 +6,8 @@ fn main() {
.supported_formats()
.unwrap()
.next()
.expect("Failed to get endpoint format");
.expect("Failed to get endpoint format")
.with_max_samples_rate();
let event_loop = cpal::EventLoop::new();
let voice_id = event_loop.build_voice(&endpoint, &format).unwrap();