fixed offset bug

This commit is contained in:
Tom Gowan 2018-10-29 23:05:13 +11:00 committed by mitchmindtree
parent 8193bc9f79
commit 93f75940d6
1 changed files with 2 additions and 5 deletions

View File

@ -371,12 +371,9 @@ pub fn build_output_stream(
// the asio buffer
// TODO need to check for Endian
for (i, channel) in my_buffers.channel.iter().enumerate(){
let buff_ptr = (asio_stream
let buff_ptr = asio_stream
.buffer_infos[i]
.buffers[index as usize] as *mut $AsioType)
// I'm not sure if this is needed anymore
// Why should we offset the pointer?
.offset(asio_stream.buffer_size as isize * i as isize);
.buffers[index as usize] as *mut $AsioType;
let asio_buffer: &'static mut [$AsioType] =
std::slice::from_raw_parts_mut(
buff_ptr,