Skip to content
Permalink
Browse files
Initial Android OpenSL ES implementation, contributed by ANTA
  • Loading branch information
slouken committed Jan 12, 2019
1 parent fb8cb95 commit 7dc92a766972595bd8472c22fec7992176d3d319
Showing with 622 additions and 1 deletion.
  1. +2 −1 Android.mk
  2. +1 −0 include/SDL_config_android.h
  3. +3 −0 src/audio/SDL_audio.c
  4. +1 −0 src/audio/SDL_sysaudio.h
  5. +573 −0 src/audio/openslES/SDL_openslES.c
  6. +42 −0 src/audio/openslES/SDL_openslES.h
@@ -20,6 +20,7 @@ LOCAL_SRC_FILES := \
$(wildcard $(LOCAL_PATH)/src/audio/*.c) \
$(wildcard $(LOCAL_PATH)/src/audio/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/audio/dummy/*.c) \
$(wildcard $(LOCAL_PATH)/src/audio/openslES/*.c) \
$(LOCAL_PATH)/src/atomic/SDL_atomic.c.arm \
$(LOCAL_PATH)/src/atomic/SDL_spinlock.c.arm \
$(wildcard $(LOCAL_PATH)/src/core/android/*.c) \
@@ -69,7 +70,7 @@ LOCAL_CFLAGS += \
LOCAL_CFLAGS += -Wno-unused-parameter -Wno-sign-compare


LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid

ifeq ($(NDK_DEBUG),1)
cmd-strip :=
@@ -130,6 +130,7 @@

/* Enable various audio drivers */
#define SDL_AUDIO_DRIVER_ANDROID 1
#define SDL_AUDIO_DRIVER_OPENSLES 1
#define SDL_AUDIO_DRIVER_DUMMY 1

/* Enable various input drivers */
@@ -92,6 +92,9 @@ static const AudioBootStrap *const bootstrap[] = {
#if SDL_AUDIO_DRIVER_ANDROID
&ANDROIDAUDIO_bootstrap,
#endif
#if SDL_AUDIO_DRIVER_OPENSLES
&openslES_bootstrap,
#endif
#if SDL_AUDIO_DRIVER_PSP
&PSPAUDIO_bootstrap,
#endif
@@ -205,6 +205,7 @@ extern AudioBootStrap DISKAUDIO_bootstrap;
extern AudioBootStrap DUMMYAUDIO_bootstrap;
extern AudioBootStrap FUSIONSOUND_bootstrap;
extern AudioBootStrap ANDROIDAUDIO_bootstrap;
extern AudioBootStrap openslES_bootstrap;
extern AudioBootStrap PSPAUDIO_bootstrap;
extern AudioBootStrap EMSCRIPTENAUDIO_bootstrap;

Loading

0 comments on commit 7dc92a7

Please sign in to comment.