Browse Source

Allow to pass slices instead of forcing a vector

`&[&[T]]` was not possible without changing the API. Nonetheless, there
is possibly a more elegant way to pass an array of output frames to the
output method.
master
Andreas Linz 5 years ago
parent
commit
314f7c364a
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/stream.rs

+ 1
- 1
src/stream.rs View File

@ -19,7 +19,7 @@ macro_rules! write_stream {
/// than `min_frame_count`, or less buffers
/// as `channel_count` are provided,
/// then a `ffi::enums::SioError::Invalid` is returned.
pub fn $name(&self, min_frame_count: u32, buffers: &Vec<Vec<$t>>) -> SioResult<u32> {
pub fn $name(&self, min_frame_count: u32, buffers: &[Vec<$t>]) -> SioResult<u32> {
let channel_count = self.layout().channel_count();
// check if buffer contains frames for all channels
if buffers.len() < channel_count as usize {

Loading…
Cancel
Save