From a412b00336cdefc1d86fc85569bc1daf5ce58acb Mon Sep 17 00:00:00 2001 From: Viktor Lazarev Date: Thu, 29 Aug 2019 08:31:18 +0200 Subject: [PATCH] Fix the "Stream::new' method --- src/host/wasapi/stream.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/host/wasapi/stream.rs b/src/host/wasapi/stream.rs index f29a02b..c42421d 100644 --- a/src/host/wasapi/stream.rs +++ b/src/host/wasapi/stream.rs @@ -87,14 +87,14 @@ pub (crate) struct StreamInner { } impl Stream { - fn new(stream_inner: Arc, mut data_callback: D, mut error_callback: E) -> Stream + pub (crate) fn new(stream_inner: Arc, mut data_callback: D, mut error_callback: E) -> Stream where D: FnMut(StreamData) + Send + 'static, E: FnMut(StreamError) + Send + 'static { let pending_scheduled_event = unsafe { synchapi::CreateEventA(ptr::null_mut(), 0, 0, ptr::null()) }; let (tx, rx) = channel(); let run_context = RunContext { - stream: Arc::new(stream_inner), + stream: stream_inner, handles: vec![pending_scheduled_event], commands: rx, };