AudioSinkEvent

sealed interface AudioSinkEvent

What a sink reports about its device, on AudioSink.events.

Inheritors

Types

Link copied to clipboard
data class DeviceChanged(val detail: String) : AudioSinkEvent

The default device changed. The engine warns (AudioDeviceChanged) and keeps the sink.

Link copied to clipboard
data class DeviceLost(val detail: String) : AudioSinkEvent

The device disappeared: unplugged, taken by another application, session interrupted.

Link copied to clipboard
data class Failed(val error: PlaybackError) : AudioSinkEvent

The sink cannot play again, and error says why. For example, the one device it was bound to is gone, and a bound sink never moves to another device.

Link copied to clipboard
data class FormatChangeRequested(val detail: String) : AudioSinkEvent

The device wants a different format than the one negotiated.

Link copied to clipboard
data class Underrun(val detail: String) : AudioSinkEvent

The device ran dry. The engine warns (AudioDeviceUnderrun), once per session; it does not rebuffer on it.