public final class

AudioSink.WriteException

extends java.lang.Exception

 java.lang.Object

↳java.lang.Throwable

↳java.lang.Exception

↳androidx.media3.exoplayer.audio.AudioSink.WriteException

Overview

Thrown when a failure occurs writing to the sink.

Summary

Fields
public final interrorCode

The error value returned from the sink implementation.

public final Formatformat

The input Format of the sink when the error occurs.

public final booleanisRecoverable

If the exception can be recovered by recreating the sink.

Constructors
publicWriteException(int errorCode, Format format, boolean isRecoverable)

Creates an instance.

Methods
from java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Fields

public final int errorCode

The error value returned from the sink implementation. If the sink writes to a platform AudioTrack, this will be the error value returned from AudioTrack or AudioTrack. Otherwise, the meaning of the error code depends on the sink implementation.

public final boolean isRecoverable

If the exception can be recovered by recreating the sink.

public final Format format

The input Format of the sink when the error occurs.

Constructors

public WriteException(int errorCode, Format format, boolean isRecoverable)

Creates an instance.

Parameters:

errorCode: The error value returned from the sink implementation.
format: The input format of the sink when the error occurs.
isRecoverable: Whether the exception can be recovered by recreating the sink.