Class AudioSink.WriteException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.google.android.exoplayer2.audio.AudioSink.WriteException
-
- All Implemented Interfaces:
Serializable
- Enclosing interface:
- AudioSink
public static final class AudioSink.WriteException extends Exception
Thrown when a failure occurs writing to the sink.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description int
errorCode
The error value returned from the sink implementation.Format
format
The inputFormat
of the sink when the error occurs.boolean
isRecoverable
If the exception can be recovered by recreating the sink.
-
Constructor Summary
Constructors Constructor Description WriteException(int errorCode, Format format, boolean isRecoverable)
Creates an instance.
-
Method Summary
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Field Detail
-
errorCode
public final int errorCode
The error value returned from the sink implementation. If the sink writes to a platformAudioTrack
, this will be the error value returned fromAudioTrack.write(byte[], int, int)
orAudioTrack.write(ByteBuffer, int, int)
. Otherwise, the meaning of the error code depends on the sink implementation.
-
isRecoverable
public final boolean isRecoverable
If the exception can be recovered by recreating the sink.
-
-
Constructor Detail
-
WriteException
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.
-
-