public final class

AudioSink.InitializationException

extends java.lang.Exception

 java.lang.Object

↳java.lang.Throwable

↳java.lang.Exception

↳androidx.media3.exoplayer.audio.AudioSink.InitializationException

Overview

Thrown when a failure occurs initializing the sink.

Summary

Fields
public final intaudioTrackState

The underlying AudioTrack's state.

public final Formatformat

The input Format of the sink when the error occurs.

public final booleanisRecoverable

If the exception can be recovered by recreating the sink.

Constructors
publicInitializationException(int audioTrackState, int sampleRate, int channelConfig, int bufferSize, Format format, boolean isRecoverable, java.lang.Exception audioTrackException)

Creates a new instance.

Methods
from java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Fields

public final int audioTrackState

The underlying AudioTrack's state.

public final boolean isRecoverable

If the exception can be recovered by recreating the sink.

public final Format format

The input Format of the sink when the error occurs.

Constructors

public InitializationException(int audioTrackState, int sampleRate, int channelConfig, int bufferSize, Format format, boolean isRecoverable, java.lang.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.