Browse Source

Set latency to `sample-rate / buffer-size`

master
Andreas Linz 5 years ago
parent
commit
e687f5e817
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      examples/sine.rs

+ 1
- 0
examples/sine.rs View File

@ -73,6 +73,7 @@ fn main() {
let sample_rate = out.sample_rate();
println!("Sample rate: {}", sample_rate);
out.set_latency(sample_rate as f64/BUF_SIZE as f64);
match out.latency() {
Ok(latency) => println!("SW latency: {}", latency),
Err(err) => println!("err: {}", err),

Loading…
Cancel
Save