#[non_exhaustive]pub enum DacEvent {
StateChanged(StreamState),
Underrun,
LostFrames {
frames: u64,
},
BitPerfectChanged(bool),
VolumeChanged(VolumeState),
FeedbackStale,
Error(Error),
DeviceLost,
}Expand description
Something that happened to the DAC or a stream.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
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.
Error(Error)
The stream (or a control request) failed.
DeviceLost
The device is gone.
Trait Implementations§
impl StructuralPartialEq for DacEvent
Auto Trait Implementations§
impl Forget for DacEvent
impl Freeze for DacEvent
impl Move for DacEvent
impl RefUnwindSafe for DacEvent
impl Send for DacEvent
impl Sync for DacEvent
impl Unpin for DacEvent
impl UnsafeUnpin for DacEvent
impl UnwindSafe for DacEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more