diff --git a/src/engine.rs b/src/engine.rs index ee335499..c36e3ee4 100644 --- a/src/engine.rs +++ b/src/engine.rs @@ -237,7 +237,7 @@ fn background(rx: Receiver) { let now = time::precise_time_ns(); if next_loop_timer > now + 1000000 /* 1ms */ { let sleep = next_loop_timer - now; - thread::park_timeout_ms((sleep / 1000000) as u32); + thread::park_timeout(Duration::from_millis(sleep / 1000000)); } next_loop_timer += FIXED_STEP_NS; } @@ -329,7 +329,7 @@ fn background(rx: Receiver) { } /// Main source of samples for a voice. -struct QueueIterator { +pub struct QueueIterator { /// The current iterator that produces samples. current: Box + Send>,