Struct jack::TransportPosition[][src]

#[repr(transparent)]pub struct TransportPosition(_);

A structure representing the transport position.

Implementations

impl TransportPosition[src]

pub fn valid_bbt(&self) -> bool[src]

Query to see if the BarBeatsTick data is valid.

pub fn valid_bbt_frame_offset(&self) -> bool[src]

Query to see if the frame offset of BarBeatsTick data is valid.

pub fn frame(&self) -> Frames[src]

Get the frame number on the transport timeline.

Remarks

  • This is not the same as what jack_frame_time returns.

pub fn set_frame(&mut self, frame: Frames)[src]

Set the frame number on the transport timeline.

pub fn frame_rate(&self) -> Option<Frames>[src]

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.

pub fn usecs(&self) -> Option<Time>[src]

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 neccessarily linear.
  • The absolute value is implementation-dependent (i.e. it could be wall-clock, time since jack started, uptime, etc).

pub fn bbt(&self) -> Option<TransportBBT>[src]

Get the BarBeatsTick data if it is valid.

pub fn set_bbt(
    &mut self,
    bbt: Option<TransportBBT>
) -> Result<(), TransportBBTValidationError>
[src]

Set the BarBeatsTick data in this position.

Arguments

  • bbt - The data to set in the position. None will invalidate the BarBeatsTick data.

Remarks

  • If the bbt does not validate, will leave the pre-existing data intact.

pub fn bbt_offset(&self) -> Option<Frames>[src]

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.

pub fn set_bbt_offset(&mut self, frame: Option<Frames>) -> Result<(), Frames>[src]

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.

Trait Implementations

impl Debug for TransportPosition[src]

impl Default for TransportPosition[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.