public static boolean checkALError(String msg){
  msg=msg.trim();
  if (msg.length() > 0) {
    msg=msg + " ";
  }
switch (al.alGetError()) {
case AL.AL_NO_ERROR:
    return false;
case AL.AL_INVALID_NAME:
  log.warn(msg + "Invalid name parameter");
return true;
case AL.AL_INVALID_ENUM:
log.warn(msg + "Invalid enumerated parameter value");
return true;
case AL.AL_INVALID_VALUE:
log.warn(msg + "Invalid parameter value");
return true;
case AL.AL_INVALID_OPERATION:
log.warn(msg + "Requested operation is not valid");
return true;
case AL.AL_OUT_OF_MEMORY:
log.warn(msg + "Out of memory");
return true;
default :
log.warn(msg + "Unrecognised error occurred");
return true;
}
}

public static boolean checkALError ( String msg ) { msg = msg . trim ( ) ; if ( msg . length ( ) > 0 ) { msg = msg + " " ; } switch ( al . alGetError ( ) ) { case AL . AL_NO_ERROR : return false ; case AL . AL_INVALID_NAME : log . warn ( msg + "Invalid name parameter" ) ; return true ; case AL . AL_INVALID_ENUM : log . warn ( msg + "Invalid enumerated parameter value" ) ; return true ; case AL . AL_INVALID_VALUE : log . warn ( msg + "Invalid parameter value" ) ; return true ; case AL . AL_INVALID_OPERATION : log . warn ( msg + "Requested operation is not valid" ) ; return true ; case AL . AL_OUT_OF_MEMORY : log . warn ( msg + "Out of memory" ) ; return true ; default : log . warn ( msg + "Unrecognised error occurred" ) ; return true ; } }
method to check if any error has occurred in the openal sub - system . < p > if an error has occurred , log the error as a warning message with the defined message pre - pended and return true . < p > if no error has occurred , return false .
