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" 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)