format: reformat project
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
This commit is contained in:
+29
-23
@@ -1,12 +1,12 @@
|
||||
#include "alutil.hpp"
|
||||
|
||||
#include "../../debug/Logger.hpp"
|
||||
|
||||
#include <fstream>
|
||||
#include <cstring>
|
||||
#include <fstream>
|
||||
#include <memory>
|
||||
#include <type_traits>
|
||||
|
||||
#include "../../debug/Logger.hpp"
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <OpenAL/al.h>
|
||||
#include <OpenAL/alc.h>
|
||||
@@ -17,28 +17,34 @@
|
||||
|
||||
static debug::Logger logger("open-al");
|
||||
|
||||
bool AL::check_errors(const std::string& filename, const std::uint_fast32_t line){
|
||||
bool AL::check_errors(
|
||||
const std::string& filename, const std::uint_fast32_t line
|
||||
) {
|
||||
ALenum error = alGetError();
|
||||
if(error != AL_NO_ERROR){
|
||||
if (error != AL_NO_ERROR) {
|
||||
logger.error() << filename << ": " << line;
|
||||
switch(error){
|
||||
case AL_INVALID_NAME:
|
||||
logger.error() << "a bad name (ID) was passed to an OpenAL function";
|
||||
break;
|
||||
case AL_INVALID_ENUM:
|
||||
logger.error() << "an invalid enum value was passed to an OpenAL function";
|
||||
break;
|
||||
case AL_INVALID_VALUE:
|
||||
logger.error() << "an invalid value was passed to an OpenAL function";
|
||||
break;
|
||||
case AL_INVALID_OPERATION:
|
||||
logger.error() << "the requested operation is not valid";
|
||||
break;
|
||||
case AL_OUT_OF_MEMORY:
|
||||
logger.error() << "the requested operation resulted in OpenAL running out of memory";
|
||||
break;
|
||||
default:
|
||||
logger.error() << "UNKNOWN AL ERROR: " << error;
|
||||
switch (error) {
|
||||
case AL_INVALID_NAME:
|
||||
logger.error()
|
||||
<< "a bad name (ID) was passed to an OpenAL function";
|
||||
break;
|
||||
case AL_INVALID_ENUM:
|
||||
logger.error()
|
||||
<< "an invalid enum value was passed to an OpenAL function";
|
||||
break;
|
||||
case AL_INVALID_VALUE:
|
||||
logger.error()
|
||||
<< "an invalid value was passed to an OpenAL function";
|
||||
break;
|
||||
case AL_INVALID_OPERATION:
|
||||
logger.error() << "the requested operation is not valid";
|
||||
break;
|
||||
case AL_OUT_OF_MEMORY:
|
||||
logger.error() << "the requested operation resulted in OpenAL "
|
||||
"running out of memory";
|
||||
break;
|
||||
default:
|
||||
logger.error() << "UNKNOWN AL ERROR: " << error;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user