Update ringbuf dev-dependency

This commit is contained in:
est31 2020-11-08 14:53:45 +01:00
parent b9a19d9f6e
commit 3ccbcb843c
2 changed files with 7 additions and 10 deletions

View file

@ -84,21 +84,18 @@ fn main() -> Result<(), anyhow::Error> {
};
let output_data_fn = move |data: &mut [f32], _: &cpal::OutputCallbackInfo| {
let mut input_fell_behind = None;
let mut input_fell_behind = false;
for sample in data {
*sample = match consumer.pop() {
Ok(s) => s,
Err(err) => {
input_fell_behind = Some(err);
Some(s) => s,
None => {
input_fell_behind = true;
0.0
}
};
}
if let Some(err) = input_fell_behind {
eprintln!(
"input stream fell behind: {:?}: try increasing latency",
err
);
if input_fell_behind {
eprintln!("input stream fell behind: try increasing latency");
}
};