Update OpenAL-soft to 1.23.1-bc7cb17.

This commit is contained in:
Miku AuahDark
2024-03-20 11:06:03 +08:00
parent 4a512be715
commit 73a6fc9196
294 changed files with 44342 additions and 40077 deletions
+9 -23
View File
@@ -17,36 +17,22 @@ extern LogLevel gLogLevel;
extern FILE *gLogFile;
#if !defined(_WIN32) && !defined(__ANDROID__)
#define TRACE(...) do { \
if UNLIKELY(gLogLevel >= LogLevel::Trace) \
fprintf(gLogFile, "[ALSOFT] (II) " __VA_ARGS__); \
} while(0)
using LogCallbackFunc = void(*)(void *userptr, char level, const char *message, int length) noexcept;
#define WARN(...) do { \
if UNLIKELY(gLogLevel >= LogLevel::Warning) \
fprintf(gLogFile, "[ALSOFT] (WW) " __VA_ARGS__); \
} while(0)
void al_set_log_callback(LogCallbackFunc callback, void *userptr);
#define ERR(...) do { \
if UNLIKELY(gLogLevel >= LogLevel::Error) \
fprintf(gLogFile, "[ALSOFT] (EE) " __VA_ARGS__); \
} while(0)
#ifdef __MINGW32__
[[gnu::format(__MINGW_PRINTF_FORMAT,2,3)]]
#else
#ifdef __USE_MINGW_ANSI_STDIO
[[gnu::format(gnu_printf,3,4)]]
#else
[[gnu::format(printf,3,4)]]
[[gnu::format(printf,2,3)]]
#endif
void al_print(LogLevel level, FILE *logfile, const char *fmt, ...);
void al_print(LogLevel level, const char *fmt, ...) noexcept;
#define TRACE(...) al_print(LogLevel::Trace, gLogFile, "[ALSOFT] (II) " __VA_ARGS__)
#define TRACE(...) al_print(LogLevel::Trace, __VA_ARGS__)
#define WARN(...) al_print(LogLevel::Warning, gLogFile, "[ALSOFT] (WW) " __VA_ARGS__)
#define WARN(...) al_print(LogLevel::Warning, __VA_ARGS__)
#define ERR(...) al_print(LogLevel::Error, gLogFile, "[ALSOFT] (EE) " __VA_ARGS__)
#endif
#define ERR(...) al_print(LogLevel::Error, __VA_ARGS__)
#endif /* CORE_LOGGING_H */