onStreamError

open fun onStreamError(stream: AudioStream, error: KlarinetException)

Called when an unrecoverable error occurs on the stream.

After this callback fires, the stream is typically in a failed state and should be closed. You may attempt to reopen a new stream via AudioEngine.openStream.

This is called on a platform thread (not the real-time audio thread).

Parameters

stream

The stream that encountered the error.

error

The KlarinetException describing what went wrong.