Torque3D/Engine/lib/openal-soft/OpenAL32/Include/alError.h

30 lines
807 B
C
Raw Normal View History

2016-10-22 09:22:33 +10:00
#ifndef _AL_ERROR_H_
#define _AL_ERROR_H_
#include "alMain.h"
2018-05-09 20:48:18 +10:00
#include "logging.h"
2016-10-22 09:22:33 +10:00
#ifdef __cplusplus
extern "C" {
#endif
extern ALboolean TrapALError;
2018-05-09 20:48:18 +10:00
void alSetError(ALCcontext *context, ALenum errorCode, const char *msg, ...) DECL_FORMAT(printf, 3, 4);
2016-10-22 09:22:33 +10:00
2018-05-09 20:48:18 +10:00
#define SETERR_GOTO(ctx, err, lbl, ...) do { \
alSetError((ctx), (err), __VA_ARGS__); \
goto lbl; \
2016-10-22 09:22:33 +10:00
} while(0)
2018-05-09 20:48:18 +10:00
#define SETERR_RETURN(ctx, err, retval, ...) do { \
alSetError((ctx), (err), __VA_ARGS__); \
return retval; \
2016-10-22 09:22:33 +10:00
} while(0)
#ifdef __cplusplus
}
#endif
#endif