File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ set(RAUDIO_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../..)
1818set (RAUDIO_SRC ${RAUDIO_ROOT} /src)
1919set (RAUDIO_EXAMPLES ${RAUDIO_ROOT} /examples)
2020
21+ option (DISABLE_DEFAULT_LOG "Disable default logging" ON )
2122option (SUPPORT_FILEFORMAT_WAV "WAV Support" TRUE )
2223option (SUPPORT_FILEFORMAT_OGG "OGG Support" TRUE )
2324option (SUPPORT_FILEFORMAT_MP3 "MP3 Support" TRUE )
@@ -47,6 +48,11 @@ if(NOT MSVC)
4748 )
4849endif ()
4950
51+ # Disable default logging option
52+ if (DISABLE_DEFAULT_LOG)
53+ target_compile_definitions (raudio PUBLIC "RAUDIO_DISABLE_DEFAULT_LOG" )
54+ endif ()
55+
5056# Audio file support options
5157if (SUPPORT_FILEFORMAT_WAV)
5258 target_compile_definitions (raudio PUBLIC SUPPORT_FILEFORMAT_WAV)
Original file line number Diff line number Diff line change @@ -185,8 +185,12 @@ typedef struct tagBITMAPINFOHEADER {
185185#include <string.h> // Required for: strcmp() [Used in IsFileExtension(), LoadWaveFromMemory(), LoadMusicStreamFromMemory()]
186186
187187#if defined(RAUDIO_STANDALONE )
188- #ifndef TRACELOG
189- #define TRACELOG (level , ...) printf(__VA_ARGS__)
188+ #ifndef RAUDIO_DISABLE_DEFAULT_LOG
189+ #ifndef TRACELOG
190+ #define TRACELOG (level , ...) printf(__VA_ARGS__)
191+ #endif
192+ #else
193+ #define TRACELOG (level , ...) ((void)0)
190194 #endif
191195
192196 // Allow custom memory allocators
You can’t perform that action at this time.
0 commit comments