Class 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 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.