pub struct StreamSelector { /* private fields */ }Expand description
Per-consumer channel selector and streaming FIR decimator.
Implementations§
Source§impl StreamSelector
impl StreamSelector
Sourcepub fn new(param: SelectParam, format: Format, source_channels: usize) -> Self
pub fn new(param: SelectParam, format: Format, source_channels: usize) -> Self
Build a selector for a source stream of format and source_channels.
Sourcepub fn param(&self) -> &SelectParam
pub fn param(&self) -> &SelectParam
The validated selection parameters.
Sourcepub fn push(
&mut self,
sample: &PackedSample,
full_timestamp: f64,
) -> Option<PackedSample>
pub fn push( &mut self, sample: &PackedSample, full_timestamp: f64, ) -> Option<PackedSample>
Feed one full-rate sample with its full deduced timestamp.
Returns Some(PackedSample) whenever an output sample is ready:
- For
decimate == 1, always returnsSome(bit-exact projection). - For
decimate > 1, evaluates the Hamming-windowed sinc FIR filter everydecimateinput samples and emits a sample timestamped at the filter center tap.
Trait Implementations§
Source§impl Clone for StreamSelector
impl Clone for StreamSelector
Auto Trait Implementations§
impl Forget for StreamSelector
impl Freeze for StreamSelector
impl Move for StreamSelector
impl RefUnwindSafe for StreamSelector
impl Send for StreamSelector
impl Sync for StreamSelector
impl Unpin for StreamSelector
impl UnsafeUnpin for StreamSelector
impl UnwindSafe for StreamSelector
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