Struct jack::TransportPosition
source · #[repr(transparent)]pub struct TransportPosition(_);
Expand description
A structure representing the transport position.
Implementations§
source§impl TransportPosition
impl TransportPosition
sourcepub fn valid_bbt_frame_offset(&self) -> bool
pub fn valid_bbt_frame_offset(&self) -> bool
Query to see if the frame offset of BarBeatsTick data is valid.
sourcepub fn frame(&self) -> Frames
pub fn frame(&self) -> Frames
Get the frame number on the transport timeline.
Remarks
- This is not the same as what jack_frame_time returns.
sourcepub fn frame_rate(&self) -> Option<Frames>
pub fn frame_rate(&self) -> Option<Frames>
Get the current frame rate, in frames per second.
Remarks
- This is only set by the server so it will be
None
if this struct hasn’t come from the sever.
sourcepub fn usecs(&self) -> Option<Time>
pub fn usecs(&self) -> Option<Time>
Get a microsecond timestamp.
Remarks
- This is only set by the server so it will be
None
if this struct hasn’t come from the sever. - Guaranteed to be monotonic, but not necessarily linear.
- The absolute value is implementation-dependent (i.e. it could be wall-clock, time since jack started, uptime, etc).
sourcepub fn bbt(&self) -> Option<TransportBBT>
pub fn bbt(&self) -> Option<TransportBBT>
Get the BarBeatsTick data if it is valid.
sourcepub fn set_bbt(
&mut self,
bbt: Option<TransportBBT>
) -> Result<(), TransportBBTValidationError>
pub fn set_bbt(
&mut self,
bbt: Option<TransportBBT>
) -> Result<(), TransportBBTValidationError>
sourcepub fn bbt_offset(&self) -> Option<Frames>
pub fn bbt_offset(&self) -> Option<Frames>
Get the frame offset for the BBT fields.
Remarks
- Should be assumed to be 0 if
None
. - If this value is Some(0), the bbt time refers to the first frame of this cycle.
- Otherwise, the bbt time refers to a frame that many frames before the start of the cycle.
sourcepub fn set_bbt_offset(&mut self, frame: Option<Frames>) -> Result<(), Frames>
pub fn set_bbt_offset(&mut self, frame: Option<Frames>) -> Result<(), Frames>
Set the frame offset for the BBT fields.
Arguments
frame
- The value to set to the offset.None
will invalidate the offset data.
Remarks
- If this value is 0, the bbt time refers to the first frame of this cycle.
- Otherwise, the bbt time refers to a frame that many frames before the start of the cycle.