Struct rusty_link::AblLink
source · pub struct AblLink { /* private fields */ }
Expand description
The representation of an abl_link instance.
Implementations§
source§impl AblLink
impl AblLink
sourcepub fn new(bpm: f64) -> AblLink
pub fn new(bpm: f64) -> AblLink
Construct a new AblLink instance with an initial tempo.
Thread-safe: yes
Realtime-safe: no
sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Is Link currently enabled?
Thread-safe: yes
Realtime-safe: yes
sourcepub fn is_start_stop_sync_enabled(&self) -> bool
pub fn is_start_stop_sync_enabled(&self) -> bool
Is start/stop synchronization enabled?
Thread-safe: yes
Realtime-safe: no
sourcepub fn enable_start_stop_sync(&self, enable: bool)
pub fn enable_start_stop_sync(&self, enable: bool)
Enable start/stop synchronization.
Thread-safe: yes
Realtime-safe: no
sourcepub fn num_peers(&self) -> u64
pub fn num_peers(&self) -> u64
How many peers are currently connected in a Link session?
Thread-safe: yes
Realtime-safe: yes
sourcepub fn clock_micros(&self) -> i64
pub fn clock_micros(&self) -> i64
Get the current link clock time in microseconds.
Thread-safe: yes
Realtime-safe: yes
sourcepub fn capture_audio_session_state(&self, session_state: &mut SessionState)
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.
sourcepub fn capture_app_session_state(&self, session_state: &mut SessionState)
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.
sourcepub fn commit_audio_session_state(&self, session_state: &SessionState)
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.
sourcepub fn commit_app_session_state(&self, session_state: &SessionState)
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.
sourcepub fn set_num_peers_callback<C: FnMut(u64) + Send + 'static>(&self, closure: C)
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.
sourcepub fn set_tempo_callback<C: FnMut(f64) + Send + 'static>(&self, closure: C)
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.
sourcepub fn set_start_stop_callback<C: FnMut(bool) + Send + 'static>(
&self,
closure: C
)
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.
sourcepub fn delete_num_peers_callback(&self)
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
sourcepub fn delete_tempo_callback(&self)
pub fn delete_tempo_callback(&self)
Delete the callback which notifies when the session tempo changes.
Thread-safe: yes
Realtime-safe: no
sourcepub fn delete_start_stop_callback(&self)
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