public class AudioException extends RuntimeException
RuntimeException
thrown when an error occurred during an audio operation.Modifier and Type | Field and Description |
---|---|
static int |
OUT_OF_MEMORY
Error when trying to open a stream but there is not enough memory.
|
static int |
UNAVAILABLE_DEVICE
Error when trying to open a stream but the audio device is not available.
|
static int |
UNSPECIFIED_OPEN_ERROR
Error when trying to open a stream but it cannot be open for an implementation-specific reason.
|
static int |
UNSUPPORTED_FORMAT
Error when trying to open a stream but the format is not supported.
|
Constructor and Description |
---|
AudioException(int errorCode)
Creates an audio exception with the specified error code.
|
AudioException(int errorCode,
Throwable cause)
Creates an audio exception with the specified error code and cause.
|
Modifier and Type | Method and Description |
---|---|
int |
getErrorCode()
Returns the error code of this audio exception.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, toString
public static final int OUT_OF_MEMORY
public static final int UNAVAILABLE_DEVICE
public static final int UNSPECIFIED_OPEN_ERROR
public static final int UNSUPPORTED_FORMAT
public AudioException(int errorCode)
errorCode
- the error code.public AudioException(int errorCode, Throwable cause)
errorCode
- the error code.cause
- the cause.