Android: enable audio driver OpenSLES when building with CMake

This commit is contained in:
Sylvain 2021-04-16 09:44:07 +02:00
parent b4f89c56c6
commit d4e96e1153
No known key found for this signature in database
GPG Key ID: 5F87E02E5BC0939E
2 changed files with 4 additions and 0 deletions

View File

@ -999,6 +999,9 @@ if(ANDROID)
file(GLOB OPENSLES_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/openslES/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${OPENSLES_AUDIO_SOURCES})
find_library(ANDROID_OPENSLES_LIBRARY OpenSLES)
list(APPEND EXTRA_LIBS ${ANDROID_DL_LIBRARY} ${ANDROID_OPENSLES_LIBRARY})
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})

View File

@ -264,6 +264,7 @@
#cmakedefine SDL_AUDIO_DRIVER_ALSA @SDL_AUDIO_DRIVER_ALSA@
#cmakedefine SDL_AUDIO_DRIVER_ALSA_DYNAMIC @SDL_AUDIO_DRIVER_ALSA_DYNAMIC@
#cmakedefine SDL_AUDIO_DRIVER_ANDROID @SDL_AUDIO_DRIVER_ANDROID@
#cmakedefine SDL_AUDIO_DRIVER_OPENSLES @SDL_AUDIO_DRIVER_OPENSLES@
#cmakedefine SDL_AUDIO_DRIVER_ARTS @SDL_AUDIO_DRIVER_ARTS@
#cmakedefine SDL_AUDIO_DRIVER_ARTS_DYNAMIC @SDL_AUDIO_DRIVER_ARTS_DYNAMIC@
#cmakedefine SDL_AUDIO_DRIVER_COREAUDIO @SDL_AUDIO_DRIVER_COREAUDIO@