Commit 02b1ebc9e0b2a8a517cfea705e733a29ba43e2e9

Sylvain 2021-04-15T21:13:17

Android: add openslES and AAudio compilation to CMakeLists

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4a20aba..b3a018f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -994,6 +994,15 @@ if(ANDROID)
     set(SDL_AUDIO_DRIVER_ANDROID 1)
     file(GLOB ANDROID_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/android/*.c)
     set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_AUDIO_SOURCES})
+
+    set(SDL_AUDIO_DRIVER_OPENSLES 1)
+    file(GLOB OPENSLES_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/openslES/*.c)
+    set(SOURCE_FILES ${SOURCE_FILES} ${OPENSLES_AUDIO_SOURCES})
+
+    set(SDL_AUDIO_DRIVER_AAUDIO 0)
+    file(GLOB AAUDIO_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/aaudio/*.c)
+    set(SOURCE_FILES ${SOURCE_FILES} ${AAUDIO_AUDIO_SOURCES})
+
     set(HAVE_SDL_AUDIO TRUE)
   endif()
   if(SDL_FILESYSTEM)