Back to Exoplayer

AudioSink.WriteException (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/audio/AudioSink.WriteException.html

latest3.9 KB
Original Source

Package com.google.android.exoplayer2.audio

Class AudioSink.WriteException


public static final classAudioSink.WriteExceptionextends[Exception](https://developer.android.com/reference/java/lang/Exception.html "class or interface in java.lang")

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 input Format 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

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

- 

errorCode

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.write(byte[], int, int) or AudioTrack.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.

- 

format

public final[Format](../Format.html "class in com.google.android.exoplayer2")format

The input Format of the sink when the error occurs.

Constructor Detail

- 

WriteException

public WriteException​(int errorCode,[Format](../Format.html "class in com.google.android.exoplayer2")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.