From a65e028412500587983f44324e4e4d506b2687da Mon Sep 17 00:00:00 2001 From: est31 Date: Sun, 8 Nov 2020 21:34:20 +0100 Subject: [PATCH] Update alsa requirement to 0.4.3 and change io to io_bytes --- Cargo.toml | 2 +- src/host/alsa/mod.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 75348f4..fd831e9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ parking_lot = "0.11" lazy_static = "1.3" [target.'cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd"))'.dependencies] -alsa = "0.4.1" +alsa = "0.4.3" nix = "0.15.0" libc = "0.2.65" jack = { version = "0.6.5", optional = true } diff --git a/src/host/alsa/mod.rs b/src/host/alsa/mod.rs index 7b8372e..b11e328 100644 --- a/src/host/alsa/mod.rs +++ b/src/host/alsa/mod.rs @@ -708,7 +708,7 @@ fn process_input( delay_frames: usize, data_callback: &mut (dyn FnMut(&Data, &InputCallbackInfo) + Send + 'static), ) -> Result<(), BackendSpecificError> { - stream.channel.io().readi(buffer)?; + stream.channel.io_bytes().readi(buffer)?; let sample_format = stream.sample_format; let data = buffer.as_mut_ptr() as *mut (); let len = buffer.len() / sample_format.sample_size(); @@ -753,7 +753,7 @@ fn process_output( data_callback(&mut data, &info); } loop { - match stream.channel.io().writei(buffer) { + match stream.channel.io_bytes().writei(buffer) { Err(err) if err.errno() == Some(nix::errno::Errno::EPIPE) => { // buffer underrun // TODO: Notify the user of this.