From 0f8babe8bd4762df6449bc2a0bd88eab7044f227 Mon Sep 17 00:00:00 2001 From: Nikita Chashchinskii Date: Wed, 25 Jan 2017 11:07:23 +0300 Subject: [PATCH 1/2] Pass period instead of buffer to snd_pcm_sw_params_set_avail_min * Also bump version from 0.4.2 to 0.4.3 --- src/alsa/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/alsa/mod.rs b/src/alsa/mod.rs index ef1f7d4..7e2aee8 100644 --- a/src/alsa/mod.rs +++ b/src/alsa/mod.rs @@ -586,7 +586,7 @@ impl Voice { let mut period = mem::uninitialized(); check_errors(alsa::snd_pcm_get_params(playback_handle, &mut buffer, &mut period)).expect("could not initialize buffer"); assert!(buffer != 0); - check_errors(alsa::snd_pcm_sw_params_set_avail_min(playback_handle, sw_params, buffer)).unwrap(); + check_errors(alsa::snd_pcm_sw_params_set_avail_min(playback_handle, sw_params, period)).unwrap(); let buffer = buffer as usize * format.channels.len(); let period = period as usize * format.channels.len(); (buffer, period) From 5c33787f486310f93847da8e3cc160568d768cb6 Mon Sep 17 00:00:00 2001 From: Nikita Chashchinskii Date: Sat, 4 Feb 2017 07:40:06 +0300 Subject: [PATCH 2/2] Bump crate version to 0.4.4 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 9c9b96e..32f9204 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cpal" -version = "0.4.3" +version = "0.4.4" authors = ["The CPAL contributors", "Pierre Krieger "] description = "Low-level cross-platform audio playing library in pure Rust." repository = "https://github.com/tomaka/cpal"