pub struct SignalQueue { /* private fields */ }Expand description
Lock-free signal queue for audio/sensor data
Specialized queue for streaming f32 samples with batching support.
Implementations§
Source§impl SignalQueue
impl SignalQueue
Sourcepub fn write_samples(&self, samples: &[f32]) -> IoResult<()>
pub fn write_samples(&self, samples: &[f32]) -> IoResult<()>
Write samples to the queue
Sourcepub fn read_batch(&self) -> IoResult<Array1<f32>>
pub fn read_batch(&self) -> IoResult<Array1<f32>>
Read a batch of samples
Sourcepub fn fill_ratio(&self) -> f32
pub fn fill_ratio(&self) -> f32
Get fill percentage (0.0 to 1.0)
Sourcepub fn underrun_count(&self) -> usize
pub fn underrun_count(&self) -> usize
Get underrun count
Sourcepub fn overrun_count(&self) -> usize
pub fn overrun_count(&self) -> usize
Get overrun count
Sourcepub fn reset_stats(&self)
pub fn reset_stats(&self)
Reset statistics
Auto Trait Implementations§
impl Freeze for SignalQueue
impl RefUnwindSafe for SignalQueue
impl Send for SignalQueue
impl Sync for SignalQueue
impl Unpin for SignalQueue
impl UnwindSafe for SignalQueue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more