pub(crate) struct StandingDepth {
pub(crate) window: usize,
pub(crate) keep: usize,
pub(crate) min_cut: usize,
pub(crate) frame_bytes: usize,
pub(crate) written: usize,
pub(crate) min_left: usize,
}Expand description
The playback queue’s standing depth, and when to cut it.
The bytes left queued after each drain are tracked at their minimum over a window of
one second of written audio. What stayed queued at every drain of a whole window was
never needed to ride out the uplink’s jitter, which the sink’s own buffer covers, so it
is pure delay: a burst after a network stall or a stalled tab, a client clock running
fast of the sink, or a sink that resumed late leaves it there, and with the drain rate
equal to the arrival rate it would stay for the rest of the session. A window that
closes with at least min_cut of it above keep cuts down to keep, the length of
the splice’s crossfade; smaller excess waits, so drift is shed in a few cuts rather than
a splice every window.
Fields§
§window: usize§keep: usize§min_cut: usize§frame_bytes: usize§written: usize§min_left: usize