etlegacy-libs/openal/OpenAL32/Include/alError.h

30 lines
807 B
C
Raw Normal View History

2015-12-12 21:07:33 +00:00
#ifndef _AL_ERROR_H_
#define _AL_ERROR_H_
#include "alMain.h"
2019-01-03 15:00:15 +00:00
#include "logging.h"
2015-12-12 21:07:33 +00:00
#ifdef __cplusplus
extern "C" {
#endif
extern ALboolean TrapALError;
2019-01-03 15:00:15 +00:00
void alSetError(ALCcontext *context, ALenum errorCode, const char *msg, ...) DECL_FORMAT(printf, 3, 4);
2015-12-12 21:07:33 +00:00
2019-01-03 15:00:15 +00:00
#define SETERR_GOTO(ctx, err, lbl, ...) do { \
alSetError((ctx), (err), __VA_ARGS__); \
goto lbl; \
2015-12-12 21:07:33 +00:00
} while(0)
2019-01-03 15:00:15 +00:00
#define SETERR_RETURN(ctx, err, retval, ...) do { \
alSetError((ctx), (err), __VA_ARGS__); \
return retval; \
2015-12-12 21:07:33 +00:00
} while(0)
#ifdef __cplusplus
}
#endif
#endif