Files
openal-soft/OpenAL32/alError.h
T
2019-07-28 21:29:59 -07:00

25 lines
750 B
C

#ifndef AL_ERROR_H
#define AL_ERROR_H
#include "AL/al.h"
#include "AL/alc.h"
#include "logging.h"
extern bool TrapALError;
void alSetError(ALCcontext *context, ALenum errorCode, const char *msg, ...) DECL_FORMAT(printf, 3, 4);
#define SETERR_GOTO(ctx, err, lbl, ...) do { \
alSetError((ctx), (err), __VA_ARGS__); \
goto lbl; \
} while(0)
#define SETERR_RETURN(ctx, err, retval, ...) do { \
alSetError((ctx), (err), __VA_ARGS__); \
return retval; \
} while(0)
#endif