From 93f75940d6acd7d54b762ede395de7b0b9008508 Mon Sep 17 00:00:00 2001 From: Tom Gowan Date: Mon, 29 Oct 2018 23:05:13 +1100 Subject: [PATCH] fixed offset bug --- src/platform/windows/asio/stream.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/platform/windows/asio/stream.rs b/src/platform/windows/asio/stream.rs index c76c07f..37c58b2 100644 --- a/src/platform/windows/asio/stream.rs +++ b/src/platform/windows/asio/stream.rs @@ -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,