Struct jack::Transport

source ·
pub struct Transport { /* private fields */ }
Expand description

A structure for querying and manipulating the JACK transport.

Implementations§

source§

impl Transport

source

pub fn start(&self) -> Result<(), Error>

Start the JACK transport rolling.

Remarks
  • Any client can make this request at any time.
  • It takes effect no sooner than the next process cycle, perhaps later if there are slow-sync clients.
  • This function is realtime-safe.
source

pub fn stop(&self) -> Result<(), Error>

Stop the JACK transport.

Remarks
  • Any client can make this request at any time.
  • It takes effect on the next process cycle.
  • This function is realtime-safe.
source

pub fn reposition(&self, pos: &TransportPosition) -> Result<(), Error>

Request a new transport position.

Arguments
  • pos - requested new transport position.
Remarks
  • May be called at any time by any client.
  • The new position takes effect in two process cycles.
  • If there are slow-sync clients and the transport is already rolling, it will enter the TransportState::Starting state and begin invoking their sync_callbacks until ready.
  • This function is realtime-safe.
source

pub fn locate(&self, frame: Frames) -> Result<(), Error>

Reposition the transport to a new frame number.

Arguments
  • frame - frame number of new transport position.
Remarks
  • May be called at any time by any client.
  • The new position takes effect in two process cycles.
  • If there are slow-sync clients and the transport is already rolling, it will enter the JackTransportStarting state and begin invoking their sync_callbacks until ready.
  • This function is realtime-safe.
source

pub fn query(&self) -> Result<TransportStatePosition, Error>

Query the current transport state and position.

Remarks
  • This function is realtime-safe, and can be called from any thread.
  • If called from the process thread, pos corresponds to the first frame of the current cycle and the state returned is valid for the entire cycle.
source

pub fn query_state(&self) -> Result<TransportState, Error>

Query the current transport state.

Remarks
  • This function is realtime-safe, and can be called from any thread.
  • If called from the process thread, the state returned is valid for the entire cycle.

Trait Implementations§

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere
T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere
T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere
T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere
U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere
U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere
U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.