#[non_exhaustive]pub enum DacEvent {
StateChanged(StreamState),
Underrun,
LostFrames {
frames: u64,
},
BitPerfectChanged(bool),
VolumeChanged(VolumeState),
FeedbackStale,
NominalAsyncHostStarvation {
empty_ms: u64,
},
CompatibilityFallback {
tier: CompatibilityFallbackTier,
reason: String,
},
Error(Error),
DeviceLost,
}Expand description
Something that happened to the DAC or a stream.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
StateChanged(StreamState)
The stream’s state changed.
Underrun
The ring ran dry and the wire was padded. Sent once per run of underruns, not once per transfer.
LostFrames
The DAC did not take some queued audio (a timed-out or short transfer). It cannot be re-sent. Bit-perfect output ends at the first loss.
BitPerfectChanged(bool)
is_bit_perfect() changed.
VolumeChanged(VolumeState)
The hardware volume or mute changed through this library.
FeedbackStale
Feedback pacing lost its live lock. Explicit playback holds its last good rate for a bounded grace period, then fails if reports do not recover. Emitted once per stale transition after publishing the cleared lock.
NominalAsyncHostStarvation
A host-paced asynchronous stream had an empty producer ring for this duration. Once per episode, reset on refill, pause or drain. This is not a measurement of the DAC FIFO or clock drift.
CompatibilityFallback
A compatibility tier was admitted after the initial OUT queue submitted successfully. Delivered to DAC and stream listeners, deduplicated when they are the same callback. Never emitted for a refused/failed startup.
Error(Error)
The stream (or a control request) failed.
DeviceLost
The device is gone.