Package com.google.android.exoplayer2.audio

## Class AudioSink.InitializationException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - com.google.android.exoplayer2.audio.AudioSink.InitializationException

- All Implemented Interfaces:
    `Serializable`
  Enclosing interface:
    AudioSink

      public static final class AudioSink.InitializationException
      extends Exception

  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

      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,
                                         boolean isRecoverable,
                                         @Nullable
                                         Exception 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`.