Package ej.audio

Class AudioException

All Implemented Interfaces:
Serializable

public class AudioException extends RuntimeException
RuntimeException thrown when an error occurred during an audio operation.
See Also:
  • Field Details

    • UNAVAILABLE_DEVICE

      public static final int UNAVAILABLE_DEVICE
      Error when trying to open a stream but the audio device is not available.
      See Also:
    • UNSUPPORTED_FORMAT

      public static final int UNSUPPORTED_FORMAT
      Error when trying to open a stream but the format is not supported.
      See Also:
    • OUT_OF_MEMORY

      public static final int OUT_OF_MEMORY
      Error when trying to open a stream but there is not enough memory.
      See Also:
    • UNSPECIFIED_OPEN_ERROR

      public static final int UNSPECIFIED_OPEN_ERROR
      Error when trying to open a stream but it cannot be open for an implementation-specific reason.
      See Also:
  • Constructor Details

    • AudioException

      public AudioException(int errorCode)
      Creates an audio exception with the specified error code.
      Parameters:
      errorCode - the error code.
    • AudioException

      public AudioException(int errorCode, String message)
      Creates an audio exception with the specified error code.
      Parameters:
      errorCode - the error code
      message - the message
    • AudioException

      public AudioException(int errorCode, Throwable cause)
      Creates an audio exception with the specified error code and cause.
      Parameters:
      errorCode - the error code
      cause - the cause
  • Method Details

    • getErrorCode

      public int getErrorCode()
      Returns the error code of this audio exception.
      Returns:
      the error code