diff --git a/src/bin/soapy-sdr-stream.rs b/src/bin/soapy-sdr-stream.rs index 1cfa3b0..59268c5 100644 --- a/src/bin/soapy-sdr-stream.rs +++ b/src/bin/soapy-sdr-stream.rs @@ -115,7 +115,7 @@ fn main() { while num > 0 && !sb.caught() { let read_size = min(num as usize, buf.len()); - let len = stream.read(&[&mut buf[..read_size]], 1_000_000).expect("read failed"); + let len = stream.read(&mut [&mut buf[..read_size]], 1_000_000).expect("read failed"); write_cfile(&buf[..len], &mut outfile).unwrap(); num -= len as i64; } diff --git a/src/device.rs b/src/device.rs index eeb19ae..5eae9c9 100644 --- a/src/device.rs +++ b/src/device.rs @@ -944,7 +944,7 @@ impl RxStream { /// /// # Panics /// * If `buffers` is not the same length as the `channels` array passed to `Device::rx_stream`. - pub fn read(&mut self, buffers: &[&mut[E]], timeout_us: i64) -> Result { + pub fn read(&mut self, buffers: &mut [&mut [E]], timeout_us: i64) -> Result { unsafe { assert!(buffers.len() == self.nchannels);