Struct rusty_link::AblLink

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

The representation of an abl_link instance.

Implementations§

source

pub fn new(bpm: f64) -> AblLink

Construct a new AblLink instance with an initial tempo.

Thread-safe: yes

Realtime-safe: no

source

pub fn is_enabled(&self) -> bool

Is Link currently enabled?

Thread-safe: yes

Realtime-safe: yes

source

pub fn enable(&self, enable: bool)

Enable/disable Link.

Thread-safe: yes

Realtime-safe: no

source

pub fn is_start_stop_sync_enabled(&self) -> bool

Is start/stop synchronization enabled?

Thread-safe: yes

Realtime-safe: no

source

pub fn enable_start_stop_sync(&self, enable: bool)

Enable start/stop synchronization.

Thread-safe: yes

Realtime-safe: no

source

pub fn num_peers(&self) -> u64

How many peers are currently connected in a Link session?

Thread-safe: yes

Realtime-safe: yes

source

pub fn clock_micros(&self) -> i64

Get the current link clock time in microseconds.

Thread-safe: yes

Realtime-safe: yes

source

pub fn capture_audio_session_state(&self, session_state: &mut SessionState)

Capture the current Link Session State from the audio thread.

Thread-safe: no

Realtime-safe: yes

This function should ONLY be called in the audio thread and must not be accessed from any other threads. After capturing the SessionState holds a snapshot of the current Link Session State, so it should be used in a local scope. The session_state should not be created on the audio thread.

source

pub fn capture_app_session_state(&self, session_state: &mut SessionState)

Capture the current Link Session State from an application thread.

Thread-safe: no

Realtime-safe: yes

Provides a mechanism for capturing the Link Session State from an application thread (other than the audio thread). After capturing the session_state contains a snapshot of the current Link state, so it should be used in a local scope.

source

pub fn commit_audio_session_state(&self, session_state: &SessionState)

Commit the given Session State to the Link session from the audio thread.

Thread-safe: no

Realtime-safe: yes

This function should ONLY be called in the audio thread. The given session_state will replace the current Link state. Modifications will be communicated to other peers in the session.

source

pub fn commit_app_session_state(&self, session_state: &SessionState)

Commit the given Session State to the Link session from an application thread.

Thread-safe: yes

Realtime-safe: no

The given SessionState will replace the current Link Session State. Modifications of the Session State will be communicated to other peers in the session.

source

pub fn set_num_peers_callback<C: FnMut(u64) + Send + 'static>(&self, closure: C)

Register a callback to be notified when the number of peers in the Link session changes.

Thread-safe: yes

Realtime-safe: no

The callback is invoked on a Link-managed thread.

source

pub fn set_tempo_callback<C: FnMut(f64) + Send + 'static>(&self, closure: C)

Register a callback to be notified when the session tempo changes.

Thread-safe: yes

Realtime-safe: no

The callback is invoked on a Link-managed thread.

source

pub fn set_start_stop_callback<C: FnMut(bool) + Send + 'static>( &self, closure: C )

Register a callback to be notified when the state of start/stop isPlaying changes.

Thread-safe: yes

Realtime-safe: no

The callback is invoked on a Link-managed thread.

source

pub fn delete_num_peers_callback(&self)

Delete the callback which notifies when the number of peers in the Link session changes.

Thread-safe: yes

Realtime-safe: no

source

pub fn delete_tempo_callback(&self)

Delete the callback which notifies when the session tempo changes.

Thread-safe: yes

Realtime-safe: no

source

pub fn delete_start_stop_callback(&self)

Delete the callback which notifies when the state of start/stop isPlaying changes.

Thread-safe: yes

Realtime-safe: no

Trait Implementations§

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

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 T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
source§

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

Performs the conversion.