pub struct Timing {
pub sample_rate: u32,
pub output_frame: u64,
pub transport_frame: u64,
pub playing: bool,
pub callback_ns: u64,
pub block_frames: u32,
pub callbacks: u64,
}Expand description
A reading of the engine’s clock, taken at the start of an audio callback.
output_frame counts every frame the engine has produced since it started, whatever the transport did. transport_frame is the scene
cursor. callback_ns is when that callback began, on the monotonic clock of the engine (Engine::now_ns). A device adds its own
output latency after this point; the engine does not know it.
Fields§
§sample_rate: u32§output_frame: u64§transport_frame: u64§playing: bool§callback_ns: u64§block_frames: u32How many frames that callback produced.
callbacks: u64How many callbacks have run.
Implementations§
Source§impl Timing
impl Timing
Sourcepub fn output_frame_at(&self, ns: u64) -> i64
pub fn output_frame_at(&self, ns: u64) -> i64
The output frame that is being produced at monotonic time ns (an estimate; it can be before output_frame for an earlier time).
Sourcepub fn ns_of_output_frame(&self, frame: u64) -> i64
pub fn ns_of_output_frame(&self, frame: u64) -> i64
The monotonic time, in nanoseconds, at which output frame frame is produced (an estimate).
Trait Implementations§
impl Copy for Timing
impl Eq for Timing
impl StructuralPartialEq for Timing
Auto Trait Implementations§
impl Forget for Timing
impl Freeze for Timing
impl Move for Timing
impl RefUnwindSafe for Timing
impl Send for Timing
impl Sync for Timing
impl Unpin for Timing
impl UnsafeUnpin for Timing
impl UnwindSafe for Timing
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