Skip to main content

Module clock

Module clock 

Source
Expand description

The ClockSource trait and the anchor-based sample↔timestamp conversion.

The conversion between an audio sample index and a wall-clock PTP timestamp (nanoseconds) is purely a matter of a linear map anchored at a known reference point. ClockAnchor captures that map and performs the checked arithmetic; every concrete ClockSource holds an anchor and delegates the conversions to it.

Structs§

ClockAnchor
A linear map between a sample index and a PTP timestamp.

Traits§

ClockSource
A source of PTP-aligned time that can map between sample indices and timestamps.