pub struct Engine { /* private fields */ }Expand description
The control half: send commands, read events and the clock. Cheap to share by reference between threads.
Implementations§
Source§impl Engine
impl Engine
Sourcepub fn send(&self, command: Command) -> Result<(), Command>
pub fn send(&self, command: Command) -> Result<(), Command>
Queues a command for the next device block. Err gives the command back when the queue is full (512 deep).
Sourcepub fn poll_event(&self) -> Option<Event>
pub fn poll_event(&self) -> Option<Event>
The next event from the audio thread, if there is one.
Sourcepub fn now_ns(&self) -> u64
pub fn now_ns(&self) -> u64
Monotonic nanoseconds since the engine was made: the time base of Timing::callback_ns.
pub fn config(&self) -> SinkConfig
Sourcepub fn dropped_events(&self) -> u64
pub fn dropped_events(&self) -> u64
Events the audio thread had to drop because the event queue was full. Scene retirements are never dropped.
Sourcepub fn dropped_dry_samples(&self) -> u64
pub fn dropped_dry_samples(&self) -> u64
Samples of the dry tap that were lost because nobody read them in time.
Auto Trait Implementations§
impl Forget for Engine
impl Freeze for Engine
impl Move for Engine
impl RefUnwindSafe for Enginewhere
Atomic<usize>: RefUnwindSafe,
ArrayQueue<Command>: RefUnwindSafe,
ArrayQueue<Event>: RefUnwindSafe,
ArrayQueue<f32>: RefUnwindSafe,
Atomic<u64>: RefUnwindSafe,
Atomic<bool>: RefUnwindSafe,
Atomic<u32>: RefUnwindSafe,
impl Send for Engine
impl Sync for Engine
impl Unpin for Engine
impl UnsafeUnpin for Engine
impl UnwindSafe for Enginewhere
Arc<Shared>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more