Enable AAUDIO driver for Android I thought this was already enabled for 2.0.16, but apparently not. Fixes https://github.com/libsdl-org/SDL/issues/3710
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 70a482e..17f0a5f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1010,7 +1010,7 @@ if(ANDROID)
find_library(ANDROID_OPENSLES_LIBRARY OpenSLES)
list(APPEND EXTRA_LIBS ${ANDROID_DL_LIBRARY} ${ANDROID_OPENSLES_LIBRARY})
- set(SDL_AUDIO_DRIVER_AAUDIO 0)
+ set(SDL_AUDIO_DRIVER_AAUDIO 1)
file(GLOB AAUDIO_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/aaudio/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${AAUDIO_AUDIO_SOURCES})
diff --git a/WhatsNew.txt b/WhatsNew.txt
index 69d2e74..08d82c0 100644
--- a/WhatsNew.txt
+++ b/WhatsNew.txt
@@ -2,6 +2,13 @@
This is a list of major changes in SDL's version history.
---------------------------------------------------------------------------
+2.0.18:
+---------------------------------------------------------------------------
+
+Android:
+* Added support for audio output and capture using AAudio
+
+---------------------------------------------------------------------------
2.0.16:
---------------------------------------------------------------------------
General:
@@ -30,7 +37,6 @@ Linux:
* Added the hint SDL_HINT_AUDIO_DEVICE_STREAM_ROLE to describe the role of your application for audio control panels
Android:
-* Added support for audio output and capture using AAudio
* Added SDL_AndroidShowToast() to show a lightweight notification
iOS:
diff --git a/configure.ac b/configure.ac
index 3ef13d4..8076f92 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3660,6 +3660,15 @@ case "$host" in
AC_DEFINE(SDL_AUDIO_DRIVER_ANDROID, 1, [ ])
SOURCES="$SOURCES $srcdir/src/audio/android/*.c"
SUMMARY_audio="${SUMMARY_audio} android"
+
+ AC_DEFINE(SDL_AUDIO_DRIVER_OPENSLES, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/audio/openslES/*.c"
+ SUMMARY_audio="${SUMMARY_audio} openslES"
+
+ AC_DEFINE(SDL_AUDIO_DRIVER_AAUDIO, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/audio/aaudio/*.c"
+ SUMMARY_audio="${SUMMARY_audio} aaudio"
+
have_audio=yes
;;
nto)
diff --git a/include/SDL_config.h.in b/include/SDL_config.h.in
index 0d999d9..2459985 100644
--- a/include/SDL_config.h.in
+++ b/include/SDL_config.h.in
@@ -262,6 +262,7 @@
#undef SDL_FILESYSTEM_DISABLED
/* Enable various audio drivers */
+#undef SDL_AUDIO_DRIVER_AAUDIO
#undef SDL_AUDIO_DRIVER_ALSA
#undef SDL_AUDIO_DRIVER_ALSA_DYNAMIC
#undef SDL_AUDIO_DRIVER_ANDROID
@@ -283,6 +284,7 @@
#undef SDL_AUDIO_DRIVER_NAS
#undef SDL_AUDIO_DRIVER_NAS_DYNAMIC
#undef SDL_AUDIO_DRIVER_NETBSD
+#undef SDL_AUDIO_DRIVER_OPENSLES
#undef SDL_AUDIO_DRIVER_OSS
#undef SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H
#undef SDL_AUDIO_DRIVER_PAUDIO
diff --git a/include/SDL_config_android.h b/include/SDL_config_android.h
index cd43314..9414ccc 100644
--- a/include/SDL_config_android.h
+++ b/include/SDL_config_android.h
@@ -143,7 +143,7 @@
/* Enable various audio drivers */
#define SDL_AUDIO_DRIVER_ANDROID 1
#define SDL_AUDIO_DRIVER_OPENSLES 1
-#define SDL_AUDIO_DRIVER_AAUDIO 0
+#define SDL_AUDIO_DRIVER_AAUDIO 1
#define SDL_AUDIO_DRIVER_DUMMY 1
/* Enable various input drivers */