pub struct JackTiming { /* private fields */ }Expand description
JACK timing metadata for a registered client.
Implementations§
Source§impl JackTiming
impl JackTiming
Sourcepub fn new(
sample_rate_hz: u32,
block_frames: usize,
input_latency_frames: u32,
output_latency_frames: u32,
) -> Result<Self>
pub fn new( sample_rate_hz: u32, block_frames: usize, input_latency_frames: u32, output_latency_frames: u32, ) -> Result<Self>
Builds timing metadata for a JACK client.
§Errors
Returns an error when sample_rate_hz or block_frames is zero.
Sourcepub fn pro_audio_default() -> Self
pub fn pro_audio_default() -> Self
Returns the pro-audio default timing: 48 kHz, 128-frame blocks, and 128-frame input and output latency.
Sourcepub fn sample_rate_hz(self) -> u32
pub fn sample_rate_hz(self) -> u32
Returns the sample rate in hertz.
Sourcepub fn block_frames(self) -> usize
pub fn block_frames(self) -> usize
Returns the JACK block size in frames.
Sourcepub fn input_latency_frames(self) -> u32
pub fn input_latency_frames(self) -> u32
Returns the reported input (capture) latency in frames.
Sourcepub fn output_latency_frames(self) -> u32
pub fn output_latency_frames(self) -> u32
Returns the reported output (playback) latency in frames.
Sourcepub fn frame_clock(self) -> Result<Clock>
pub fn frame_clock(self) -> Result<Clock>
Builds a frame-counting Clock keyed by jack_clock_symbol at this
timing’s sample rate.
§Errors
Returns an error if the underlying clock rejects the rate.
Trait Implementations§
Source§impl Clone for JackTiming
impl Clone for JackTiming
Source§fn clone(&self) -> JackTiming
fn clone(&self) -> JackTiming
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for JackTiming
Source§impl Debug for JackTiming
impl Debug for JackTiming
impl Eq for JackTiming
Source§impl PartialEq for JackTiming
impl PartialEq for JackTiming
Source§fn eq(&self, other: &JackTiming) -> bool
fn eq(&self, other: &JackTiming) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for JackTiming
Auto Trait Implementations§
impl Freeze for JackTiming
impl RefUnwindSafe for JackTiming
impl Send for JackTiming
impl Sync for JackTiming
impl Unpin for JackTiming
impl UnsafeUnpin for JackTiming
impl UnwindSafe for JackTiming
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