Skip to main content

SyncGroup

Struct SyncGroup 

Source
pub struct SyncGroup { /* private fields */ }
Expand description

Live multi-stream aligner combining N numeric Inlets onto one common monotonic time grid.

Implementations§

Source§

impl SyncGroup

Source

pub fn new(inlets: Vec<Inlet>, cfg: SyncConfig) -> Result<Self>

Build a SyncGroup from opened numeric Inlets and cfg.

When cfg.auto_postprocess is true (the default), enables CLOCKSYNC | DRIFT | DEVICE_DELAY on each inlet so clock drift and calibrated device delays are corrected before resampling.

Source

pub fn stream_count(&self) -> usize

Number of input streams in this group.

Source

pub fn total_channels(&self) -> usize

Total concatenated channels across all input streams.

Source

pub fn output_rate(&self) -> f64

Common output grid sampling rate in Hz.

Source

pub fn lookahead_seconds(&self) -> f64

Lookahead latency in seconds (half_width / min_input_srate).

Source

pub fn inlets(&self) -> &[Inlet]

Borrow the underlying inlets.

Source

pub fn pull( &mut self, out: &mut Vec<AlignedSample>, max_samples: usize, timeout: Duration, ) -> Result<usize>

Pull up to max_samples aligned samples onto the common monotonic time grid, waiting up to timeout for enough lookahead samples to arrive.

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>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.