Back to Exoplayer

AudioSink.InitializationException (ExoPlayer library)

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

latest4.4 KB
Original Source

Package com.google.android.exoplayer2.audio

Class AudioSink.InitializationException


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

Thrown when a failure occurs initializing the sink. See Also:Serialized Form

Field Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | int | audioTrackState | The underlying AudioTrack's state. | | 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 | | --- | --- | | InitializationException​(int audioTrackState, int sampleRate, int channelConfig, int bufferSize, Format format, boolean isRecoverable, Exception audioTrackException) | Creates a new 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

- 

audioTrackState

public final int audioTrackState

The underlying AudioTrack's state.

- 

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

- 

InitializationException

public InitializationException​(int audioTrackState,
                               int sampleRate,
                               int channelConfig,
                               int bufferSize,[Format](../Format.html "class in com.google.android.exoplayer2")format,
                               boolean isRecoverable,
                               @Nullable[Exception](https://developer.android.com/reference/java/lang/Exception.html "class or interface in java.lang")audioTrackException)

Creates a new instance. Parameters:audioTrackState - The underlying AudioTrack's state.sampleRate - The requested sample rate in Hz.channelConfig - The requested channel configuration.bufferSize - The requested buffer size in bytes.format - The input format of the sink when the error occurs.isRecoverable - Whether the exception can be recovered by recreating the sink.audioTrackException - Exception thrown during the creation of the AudioTrack.