29 #include "nomlib/audio/AL/OpenAL.hpp"
36 void al_err (
const std::string& file, uint32 line )
38 ALenum error_code = alGetError();
40 if ( error_code != AL_NO_ERROR )
42 std::string error, description;
49 description =
"An unknown error has occurred.";
55 error =
"AL_INVALID_NAME";
56 description =
"Invalid name (identifier).";
62 error =
"AL_INVALID_ENUM";
63 description =
"Invalid enumeration (attribute).";
67 case AL_INVALID_VALUE:
69 error =
"AL_INVALID_VALUE";
70 description =
"Invalid value.";
74 case AL_INVALID_OPERATION:
76 error =
"AL_INVALID_OPERATION";
77 description =
"Requested operation is not valid.";
81 case AL_OUT_OF_MEMORY:
83 error =
"AL_OUT_OF_MEMORY";
84 description =
"Requested operation resulted in OpenAL running out of memory";
89 std::cout <<
"NOM_LOG_ERR at " << getCurrentTime() <<
"In file " << file <<
":" << line << std::endl <<
"Error: " << error <<
", " << description << std::endl << std::endl;