make WASAPI configurable in autofoo and cmake (default is on.)

closes bug #3798.
This commit is contained in:
Ozkan Sezer
2018-07-01 17:01:04 +03:00
parent 013b146de9
commit 8857791627
3 changed files with 20 additions and 3 deletions

13
configure vendored
View File

@@ -866,6 +866,7 @@ enable_input_tslib
enable_pthreads
enable_pthread_sem
enable_directx
enable_audio_wasapi
enable_sdl_dlopen
enable_clock_gettime
enable_rpath
@@ -1620,6 +1621,7 @@ Optional Features:
[[default=yes]]
--enable-pthread-sem use pthread semaphores [[default=yes]]
--enable-directx use DirectX for Windows audio/video [[default=yes]]
--enable-audio-wasapi use the Windows WASAPI audio driver [[default=yes]]
--enable-sdl-dlopen use dlopen for shared object loading [[default=yes]]
--enable-clock_gettime use clock_gettime() instead of gettimeofday() on
UNIX [[default=yes]]
@@ -23231,6 +23233,14 @@ $as_echo "#define HAVE_XINPUT_STATE_EX 1" >>confdefs.h
SUMMARY_video="${SUMMARY_video} directx"
SUMMARY_audio="${SUMMARY_audio} directx"
# Check whether --enable-audio-wasapi was given.
if test "${enable_audio_wasapi+set}" = set; then :
enableval=$enable_audio_wasapi;
else
enable_audio_wasapi=yes
fi
# FIXME: latest Cygwin finds dinput headers, but we die on other win32 headers.
# FIXME: ...so force it off for now.
case "$host" in
@@ -24134,10 +24144,11 @@ $as_echo "#define SDL_AUDIO_DRIVER_DSOUND 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/audio/directsound/*.c"
fi
if test x$have_wasapi = xyes; then
if test x$have_wasapi = xyes -a x$enable_audio_wasapi = xyes; then
$as_echo "#define SDL_AUDIO_DRIVER_WASAPI 1" >>confdefs.h
SUMMARY_audio="${SUMMARY_audio} wasapi"
SOURCES="$SOURCES $srcdir/src/audio/wasapi/*.c"
fi
have_audio=yes