pub struct SampleProducer { /* private fields */ }Expand description
Audio-thread half. Real-time safe: push_samples never allocates,
locks, or blocks.
Implementations§
Source§impl SampleProducer
impl SampleProducer
Sourcepub fn push_samples(&mut self, samples: &[f32]) -> usize
pub fn push_samples(&mut self, samples: &[f32]) -> usize
Push interleaved samples; samples.len() must be a multiple of the
channel count (whole frames — the capture API’s contract, checked in
debug builds only to keep the hot path free).
Returns how many samples were written; the rest are dropped if the
ring is full (dropping is the real-time-safe overflow policy).
Auto Trait Implementations§
impl Freeze for SampleProducer
impl !RefUnwindSafe for SampleProducer
impl Send for SampleProducer
impl Sync for SampleProducer
impl Unpin for SampleProducer
impl UnsafeUnpin for SampleProducer
impl !UnwindSafe for SampleProducer
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