From 52821d9c37dc39cb8f503443ff6fdb51411402bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Capucho?= Date: Fri, 19 Mar 2021 19:57:08 +0000 Subject: [PATCH] Fix alsa in some configs outputting bad audio This was introduced in 6b91485 and could cause issues with some alsa configurations like that of pipewire-alsa which caused the audio to be become weirdly distorted --- Cargo.toml | 2 +- src/host/alsa/mod.rs | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index aa593e0..dfb4cfa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cpal" -version = "0.13.2" +version = "0.13.3" authors = ["The CPAL contributors", "Pierre Krieger "] description = "Low-level cross-platform audio I/O library in pure Rust." repository = "https://github.com/rustaudio/cpal" diff --git a/src/host/alsa/mod.rs b/src/host/alsa/mod.rs index d306519..52a51e8 100644 --- a/src/host/alsa/mod.rs +++ b/src/host/alsa/mod.rs @@ -619,10 +619,7 @@ fn output_stream_worker( .unwrap_or(PollDescriptorsFlow::Continue); match flow { - PollDescriptorsFlow::Continue => { - report_error(stream.channel.prepare(), error_callback); - continue; - } + PollDescriptorsFlow::Continue => continue, PollDescriptorsFlow::XRun => { report_error(stream.channel.prepare(), error_callback); continue;