#[non_exhaustive]pub struct StreamStats {Show 59 fields
pub state: StreamState,
pub bit_perfect: bool,
pub bit_perfect_blocker: Option<BitPerfectBlocker>,
pub software_gain: f32,
pub underruns: u64,
pub lost_frames: u64,
pub short_packets: u64,
pub zero_packets: u64,
pub urb_timeouts: u64,
pub completed_transfers: u64,
pub frames_written: u64,
pub frames_completed: u64,
pub played_frames: u64,
pub latency_frames: u64,
pub latency_ms: f64,
pub queued_frames: u64,
pub buffer_ms: u32,
pub buffer_target_ms: u32,
pub active_target_ms: u32,
pub buffer_capacity_ms: u32,
pub transfer_queue_depth: u32,
pub last_turnaround_us: u64,
pub max_turnaround_us: u64,
pub last_submit_gap_us: u64,
pub max_submit_gap_us: u64,
pub worker_gap_over_10ms: u64,
pub worker_gap_over_50ms: u64,
pub max_worker_gap_us: u64,
pub max_worker_loop_gap_us: u64,
pub max_event_pump_elapsed_us: u64,
pub max_event_pump_timeout_overrun_us: u64,
pub adaptive_queue_changes: u64,
pub adaptive_queue_slots: u64,
pub adaptive_queue_us: u64,
pub effective_rate_hz: f64,
pub feedback_active: bool,
pub feedback_reports: u64,
pub feedback_timeouts: u64,
pub feedback_errors: u64,
pub feedback_rejected: u64,
pub feedback_age_ms: Option<u64>,
pub feedback_rate_hz: Option<f64>,
pub feedback_stale: bool,
pub feedback_locked: bool,
pub feedback_empty: u64,
pub implicit_fifo_depth: u32,
pub implicit_fifo_high_water: u32,
pub implicit_waits: u64,
pub implicit_empty_bus: u64,
pub implicit_overruns: u64,
pub implicit_in_transfers: u64,
pub implicit_out_of_order: u64,
pub implicit_invalid_packets: u64,
pub implicit_measured_frames: u64,
pub implicit_scheduled_frames: u64,
pub stable: bool,
pub clock_verified: bool,
pub payload_verified: bool,
pub payload_constant_for_ms: Option<u64>,
}Expand description
Counters of a stream. Frames are in the unit
StreamFormat::counter_rate_hz gives the rate of.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.state: StreamState§bit_perfect: bool§bit_perfect_blocker: Option<BitPerfectBlocker>Why bit_perfect is false, if it is.
software_gain: f32§underruns: u64Runs of padding because the ring ran dry (counted per transfer).
lost_frames: u64Frames not confirmed delivered. Failed packets are charged in full, so this may exceed actual loss when a failed request reports partial bytes.
short_packets: u64§zero_packets: u64§urb_timeouts: u64Isochronous transfers libusb reported as timed out.
completed_transfers: u64§frames_written: u64Frames the host has written.
frames_completed: u64Frames the DAC has taken, music and padding alike.
played_frames: u64Music frames completed on the bus since the start or the last flush.
latency_frames: u64Music frames between the host and the DAC: ring plus bus.
latency_ms: f64§queued_frames: u64Frames in the ring.
buffer_ms: u32§buffer_target_ms: u32The deep ring depth (DacConfig::buffer_target_ms).
active_target_ms: u32The depth writable_bytes() asks for now: buffer_target_ms, or the
shallower processing depth while software gain or host processing is on.
buffer_capacity_ms: u32§transfer_queue_depth: u32Transfers currently submitted to the bus.
last_turnaround_us: u64§max_turnaround_us: u64§last_submit_gap_us: u64§max_submit_gap_us: u64§worker_gap_over_10ms: u64Checkpoint gaps excluding the most recent event-pump elapsed time.
worker_gap_over_50ms: u64§max_worker_gap_us: u64§max_worker_loop_gap_us: u64Longest checkpoint-to-checkpoint interval, including the event pump.
max_event_pump_elapsed_us: u64Longest time inside the event pump, including callbacks and scheduling.
max_event_pump_timeout_overrun_us: u64Largest event-pump elapsed time beyond its requested timeout.
adaptive_queue_changes: u64§adaptive_queue_slots: u64§adaptive_queue_us: u64§effective_rate_hz: f64Rate the DAC has actually consumed frames at since the start.
feedback_active: boolLive feedback is locked. Equivalent to feedback_locked in 0.1.1.
feedback_reports: u64§feedback_timeouts: u64§feedback_errors: u64§feedback_rejected: u64§feedback_age_ms: Option<u64>Time since the last valid feedback report.
feedback_rate_hz: Option<f64>The sample rate the last feedback report implies.
feedback_stale: bool§feedback_locked: boolThe selected explicit or implicit source has established usable timing.
feedback_empty: u64Empty explicit polls or empty implicit IN patterns.
implicit_fifo_depth: u32§implicit_fifo_high_water: u32§implicit_waits: u64§implicit_empty_bus: u64§implicit_overruns: u64§implicit_in_transfers: u64§implicit_out_of_order: u64§implicit_invalid_packets: u64§implicit_measured_frames: u64§implicit_scheduled_frames: u64§stable: boolThe transfers have been lossless for long enough (about 256 ms) with no underrun and no lost audio. A stream that lost audio is never stable again.
clock_verified: boolThe DAC confirmed the sampling frequency (or the device quirk trusts
its SET_CUR). False before the clock is verified and after it is lost.
payload_verified: boolThe wire payload audit passes (see is_bit_perfect).
payload_constant_for_ms: Option<u64>How long, in milliseconds, the wire payload has been failing the audit, while it does.