Struct jack::ProcessScope
source · [−]pub struct ProcessScope { /* private fields */ }
Expand description
ProcessScope
provides information on the client and frame time information within a process
callback.
Implementations
sourceimpl ProcessScope
impl ProcessScope
sourcepub fn last_frame_time(&self) -> Frames
pub fn last_frame_time(&self) -> Frames
The precise time at the start of the current process cycle. This function may only be used
from the process callback, and can be used to interpret timestamps generated by
self.frame_time()
in other threads, with respect to the current process cycle.
sourcepub fn frames_since_cycle_start(&self) -> Frames
pub fn frames_since_cycle_start(&self) -> Frames
The estimated time in frames that has passed since the JACK server began the current process cycle.
sourcepub fn cycle_times(&self) -> Result<CycleTimes, Error>
pub fn cycle_times(&self) -> Result<CycleTimes, Error>
Provides the internal cycle timing information as used by most of the other time related functions. This allows the caller to map between frame counts and microseconds with full precision (i.e. without rounding frame times to integers), and also provides e.g. the microseconds time of the start of the current cycle directly (it has to be computed otherwise).
Err(Error::TimeError)
is returned on failure.
Err(Error::WeakFunctionNotFound)
if the function does not exist.
sourcepub fn client_ptr(&self) -> *mut jack_client_t
pub fn client_ptr(&self) -> *mut jack_client_t
Expose the client_ptr
for low level purposes.
This is mostly for use within the jack crate itself.
sourcepub unsafe fn from_raw(n_frames: Frames, client_ptr: *mut jack_client_t) -> Self
pub unsafe fn from_raw(n_frames: Frames, client_ptr: *mut jack_client_t) -> Self
Create a ProcessScope
for the client with the given pointer and the specified amount of
frames.
This is mostly for use within the jack crate itself.
Safety
It is unsafe to create a ProcessScope
since it may not be valid. For library user’s, the
ProcessScope
is usually passed in as a parameter to a trait’s method.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ProcessScope
impl !Send for ProcessScope
impl !Sync for ProcessScope
impl Unpin for ProcessScope
impl UnwindSafe for ProcessScope
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more