Struct Prepared Clocked Input
pub struct PreparedClockedInput { /* private fields */ }Expand description
Control-prepared worker conversion from raw capture to a graph-rate queue. Matching 1..64 channel counts, 8000..192000 nominal integer rates, existing clock/sinc bounds and 1..65536 fixed frames apply. Output scratch<=16MiB is additional to converter/internal queues and source/destination ring memory. Construction/drop allocate off callbacks. Pumping uses no heap/locks/I/O; worker pacing, queue priming, thread ownership and endpoint shutdown are explicit. No physical clock alignment, universal drift stability or deadline guarantee.
Implementations§
§impl PreparedClockedInput
impl PreparedClockedInput
pub fn new(
consumer: AudioConsumer,
producer: AudioProducer,
input_rate: u32,
output_rate: u32,
options: ClockedDuplexOptions,
) -> Result<Self, ClockedDuplexError>
pub fn new( consumer: AudioConsumer, producer: AudioProducer, input_rate: u32, output_rate: u32, options: ClockedDuplexOptions, ) -> Result<Self, ClockedDuplexError>
Construct outside active callbacks, retaining one raw consumer and one converted producer. Options.clock.capacity_frames matches the raw ring; target occupancy governs priming, not destination publication. Nominal rates are explicit, without inferred device/graph configuration or events.
pub fn pump(&mut self) -> ClockedInputProgress
pub fn pump(&mut self) -> ClockedInputProgress
Convert one fixed block only after the prior suffix has been published. Full/partial destination queues retain exact frames without advancing sinc/ controller/capture state again. Priming and shortage produce intentional zeros under the existing clocked-duplex policy. No waiting or device I/O.
pub fn statistics(&self) -> OutputStatistics
pub fn statistics(&self) -> OutputStatistics
Relaxed independent converter counters; converted blocks include priming zeros. Pending publication makes no additional converter callback.
pub fn clock_statistics(&self) -> ClockedDuplexStatistics
pub fn clock_statistics(&self) -> ClockedDuplexStatistics
Raw queue plus prefetched occupancy/controller correction, sampled during conversion; not a coherent hardware timestamp or measured stream delay.