VaKeR CYBER ARMY
Logo of a company Server : Apache/2.4.41 (Ubuntu)
System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /usr/share/emscripten/tests/freealut/src/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/emscripten/tests/freealut/src/alutError.c
#include "alutInternal.h"
#include <stdio.h>

static ALenum lastError = ALUT_ERROR_NO_ERROR;

void _alutSetError(ALenum err)
{
  /* print a message to stderr if ALUT_DEBUG environment variable is defined */
  if (getenv("ALUT_DEBUG"))
  {
    fprintf(stderr, "ALUT error: %s\n", alutGetErrorString(err));
  }

  if (lastError == ALUT_ERROR_NO_ERROR)
  {
    lastError = err;
  }
}

ALenum alutGetError(void)
{
  ALint ret = lastError;

  lastError = ALUT_ERROR_NO_ERROR;
  return ret;
}

const char *alutGetErrorString(ALenum error)
{
  switch (error)
  {
  case ALUT_ERROR_NO_ERROR:
    return "No ALUT error found";

  case ALUT_ERROR_OUT_OF_MEMORY:
    return "ALUT ran out of memory";

  case ALUT_ERROR_INVALID_ENUM:
    return "ALUT was given an invalid enumeration token";

  case ALUT_ERROR_INVALID_VALUE:
    return "ALUT was given an invalid value";

  case ALUT_ERROR_INVALID_OPERATION:
    return "The operation was invalid in the current ALUT state";

  case ALUT_ERROR_NO_CURRENT_CONTEXT:
    return "There is no current AL context";

  case ALUT_ERROR_AL_ERROR_ON_ENTRY:
    return "There was already an AL error on entry to an ALUT function";

  case ALUT_ERROR_ALC_ERROR_ON_ENTRY:
    return "There was already an ALC error on entry to an ALUT function";

  case ALUT_ERROR_OPEN_DEVICE:
    return "There was an error opening the ALC device";

  case ALUT_ERROR_CLOSE_DEVICE:
    return "There was an error closing the ALC device";

  case ALUT_ERROR_CREATE_CONTEXT:
    return "There was an error creating an ALC context";

  case ALUT_ERROR_MAKE_CONTEXT_CURRENT:
    return "Could not change the current ALC context";

  case ALUT_ERROR_DESTROY_CONTEXT:
    return "There was an error destroying the ALC context";

  case ALUT_ERROR_GEN_BUFFERS:
    return "There was an error generating an AL buffer";

  case ALUT_ERROR_BUFFER_DATA:
    return "There was an error passing buffer data to AL";

  case ALUT_ERROR_IO_ERROR:
    return "I/O error";

  case ALUT_ERROR_UNSUPPORTED_FILE_TYPE:
    return "Unsupported file type";

  case ALUT_ERROR_UNSUPPORTED_FILE_SUBTYPE:
    return "Unsupported mode within an otherwise usable file type";

  case ALUT_ERROR_CORRUPT_OR_TRUNCATED_DATA:
    return "The sound data was corrupt or truncated";

  default:
    return "An impossible ALUT error condition was reported?!?";
  }
}

VaKeR 2022