events

abstract val events: Flow<AudioSinkEvent>

Device loss, underrun, format change. The sink reports; the engine decides what to do.

What the engine does with this today, per event, so a sink author is not guessing. It collects the feed on the session lane. DeviceLost and DeviceChanged become a PlaybackWarning.AudioDeviceChanged. Underrun becomes an AudioDeviceUnderrun warning, once per session. FormatChangeRequested becomes an AudioDeviceChanged warning naming the request. Failed stops the session, and the player fails with the event's error. Nothing here rebuilds a sink or recovers a device yet: publish honestly, and expect a warning or a typed failure rather than a repair.