pub struct JackTransportState { /* private fields */ }Expand description
Snapshot of JACK transport state for one process callback.
Implementations§
Source§impl JackTransportState
impl JackTransportState
Sourcepub fn stopped(sample_pos: u64) -> Self
pub fn stopped(sample_pos: u64) -> Self
Builds a stopped transport at sample_pos with a default 120 BPM tempo
and a zero PPQ position.
Sourcepub fn rolling(sample_pos: u64, tempo_bpm: f64, ppq_pos: f64) -> Result<Self>
pub fn rolling(sample_pos: u64, tempo_bpm: f64, ppq_pos: f64) -> Result<Self>
Builds a rolling transport at sample_pos with the given tempo and PPQ
position.
§Errors
Returns an error when tempo_bpm is non-finite or not positive, or when
ppq_pos is non-finite.
Sourcepub fn rolling_flag(self) -> bool
pub fn rolling_flag(self) -> bool
Returns whether the transport is rolling (playing).
Sourcepub fn sample_pos(self) -> u64
pub fn sample_pos(self) -> u64
Returns the transport position in sample frames.
Sourcepub fn to_graph_transport(self) -> Transport
pub fn to_graph_transport(self) -> Transport
Converts this snapshot into the audio-graph Transport consumed by a
process block.
Trait Implementations§
Source§impl Clone for JackTransportState
impl Clone for JackTransportState
Source§fn clone(&self) -> JackTransportState
fn clone(&self) -> JackTransportState
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 JackTransportState
Source§impl Debug for JackTransportState
impl Debug for JackTransportState
Source§impl PartialEq for JackTransportState
impl PartialEq for JackTransportState
Source§fn eq(&self, other: &JackTransportState) -> bool
fn eq(&self, other: &JackTransportState) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for JackTransportState
Auto Trait Implementations§
impl Freeze for JackTransportState
impl RefUnwindSafe for JackTransportState
impl Send for JackTransportState
impl Sync for JackTransportState
impl Unpin for JackTransportState
impl UnsafeUnpin for JackTransportState
impl UnwindSafe for JackTransportState
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