Skip to content

Commit

Permalink
Initial Android OpenSL ES implementation, contributed by ANTA
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jan 12, 2019
1 parent fb8cb95 commit 7dc92a7
Show file tree
Hide file tree
Showing 6 changed files with 622 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Android.mk
Expand Up @@ -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) \
Expand Down Expand Up @@ -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 :=
Expand Down
1 change: 1 addition & 0 deletions include/SDL_config_android.h
Expand Up @@ -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 */
Expand Down
3 changes: 3 additions & 0 deletions src/audio/SDL_audio.c
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/audio/SDL_sysaudio.h
Expand Up @@ -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;

Expand Down

0 comments on commit 7dc92a7

Please sign in to comment.