diff options
-rw-r--r-- | Alc/ALc.c | 2 | ||||
-rw-r--r-- | CMakeLists.txt | 11 | ||||
-rw-r--r-- | config.h.in | 3 |
3 files changed, 14 insertions, 2 deletions
@@ -71,7 +71,9 @@ static BackendInfo BackendList[] = { #endif { "null", alc_null_init, alc_null_deinit, alc_null_probe, EmptyFuncs }, +#ifdef HAVE_WAVE { "wave", alc_wave_init, alc_wave_deinit, alc_wave_probe, EmptyFuncs }, +#endif { NULL, NULL, NULL, NULL, EmptyFuncs } }; diff --git a/CMakeLists.txt b/CMakeLists.txt index fe7bdb48..ebfa796a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,6 +32,7 @@ OPTION(DSOUND "Check for DirectSound backend" ON) OPTION(WINMM "Check for Windows Multimedia backend" ON) OPTION(PORTAUDIO "Check for PortAudio backend" ON) OPTION(PULSEAUDIO "Check for PulseAudio backend" ON) +OPTION(WAVE "Enable Wave Writer backend" ON) OPTION(DLOPEN "Check for the dlopen API for loading optional libs" ON) @@ -311,7 +312,6 @@ SET(ALC_OBJS Alc/ALc.c Alc/alcThread.c Alc/bs2b.c Alc/null.c - Alc/wave.c ) SET(BACKENDS "") @@ -424,8 +424,15 @@ IF(PULSEAUDIO) ENDIF() ENDIF() +# Optionally enable the Wave Writer backend +IF(WAVE) + SET(HAVE_WAVE 1) + SET(ALC_OBJS ${ALC_OBJS} Alc/wave.c) + SET(BACKENDS "${BACKENDS} WaveFile,") +ENDIF() + # This is always available -SET(BACKENDS "${BACKENDS} WaveFile, Null") +SET(BACKENDS "${BACKENDS} Null") # Needed for openal.pc.in SET(prefix ${CMAKE_INSTALL_PREFIX}) diff --git a/config.h.in b/config.h.in index 1d7c8cce..3c1e7e67 100644 --- a/config.h.in +++ b/config.h.in @@ -25,6 +25,9 @@ /* Define if we have the PulseAudio backend */ #cmakedefine HAVE_PULSEAUDIO +/* Define if we have the Wave Writer backend */ +#cmakedefine HAVE_WAVE + /* Define if we have dlfcn.h */ #cmakedefine HAVE_DLFCN_H |