aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r--OpenAL32/Include/alMain.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index d04fc449..95d08483 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -533,6 +533,30 @@ void al_print(const char *fname, unsigned int line, const char *fmt, ...)
PRINTF_STYLE(3,4);
#define AL_PRINT(...) al_print(__FILE__, __LINE__, __VA_ARGS__)
+enum LogLevel {
+ NoLog,
+ LogError,
+ LogWarning,
+ LogTrace
+};
+extern enum LogLevel LogLevel;
+
+#define TRACE(...) do { \
+ if(LogLevel >= LogTrace) \
+ AL_PRINT(__VA_ARGS__); \
+} while(0)
+
+#define WARN(...) do { \
+ if(LogLevel >= LogWarning) \
+ AL_PRINT(__VA_ARGS__); \
+} while(0)
+
+#define ERROR(...) do { \
+ if(LogLevel >= LogError) \
+ AL_PRINT(__VA_ARGS__); \
+} while(0)
+
+
extern ALdouble ConeScale;
extern ALdouble ZScale;