12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- #ifndef __AUDIOLOG_H__
- #define __AUDIOLOG_H__
- #pragma once
- #ifdef __cplusplus
- extern "C" {
- #endif
- #define AUDIO_LOG_LEVEL_NONE 0
- #define AUDIO_LOG_LEVEL_INFO 1
- #define AUDOI_LOG_LEVEL_TRACE 2
- #define AUDIO_LOG_LEVEL_DEBUG 3
- #define AUDIO_LOG_LEVEL_WARN 4
- #define AUDIO_LOG_LEVEL_ERROR 5
- #define AUDIO_LOG_LEVEL_ALL 10
- #ifdef _WIN32
- typedef void(__stdcall* audio_log_func)(int level, const char* s);
- #else
- typedef void(__attribute__((__stdcall))* audio_log_func)(int level, const char* s);
- #endif
- void audio_log_set_level(int level);
- audio_log_func audio_log_set_func(audio_log_func func);
- void audio_log(int level, const char *str);
- void audio_log_v(int level, const char *fmt, ...);
- //#define AUDIO_LOG_DEBUG(fmt, ...) \
- // audio_log_v(AUDIO_LOG_LEVEL_DEBUG, fmt, __VA_ARGS__ )
- //
- //#define AUDIO_LOG_INFO(fmt, ...) \
- // audio_log_v(AUDIO_LOG_LEVEL_INFO, fmt, __VA_ARGS__ )
- //
- //#define AUDIO_LOG_TRACE(fmt, ...) \
- // audio_log_v(AUDOI_LOG_LEVEL_TRACE, fmt, __VA_ARGS__ )
- //
- //#define AUDIO_LOG_WARN(fmt, ...) \
- // audio_log_v(AUDIO_LOG_LEVEL_WARN, fmt, __VA_ARGS__ )
- //
- //#define audio_log_v(AUDIO_LOG_LEVEL_ERROR,fmt, ...) \
- // audio_log_v(AUDIO_LOG_LEVEL_ERROR, fmt, __VA_ARGS__ )
- #ifdef __cplusplus
- } // extern "C" {
- #endif
- #endif //__AUDIOLOG_H__
|