Commit e2ea92a3 authored by Sylvain Berfini's avatar Sylvain Berfini
Browse files

Added option to disable opensles soundcard compilation for Android

parent 427dc464
...@@ -93,7 +93,6 @@ LOCAL_SRC_FILES = \ ...@@ -93,7 +93,6 @@ LOCAL_SRC_FILES = \
audiofilters/flowcontrol.c \ audiofilters/flowcontrol.c \
android/androidsound_depr.cpp \ android/androidsound_depr.cpp \
android/loader.cpp \ android/loader.cpp \
android/androidsound_opensles.cpp \
android/androidsound.cpp \ android/androidsound.cpp \
android/AudioRecord.cpp \ android/AudioRecord.cpp \
android/AudioTrack.cpp \ android/AudioTrack.cpp \
...@@ -102,6 +101,11 @@ LOCAL_SRC_FILES = \ ...@@ -102,6 +101,11 @@ LOCAL_SRC_FILES = \
LOCAL_STATIC_LIBRARIES := LOCAL_STATIC_LIBRARIES :=
ifeq ($(BUILD_OPENSLES_SOUNDCARD),1)
LOCAL_SRC_FILES += android/androidsound_opensles.cpp
LOCAL_CFLAGS += -D__OPENSLES_ENABLED__
endif
##if BUILD_ALSA ##if BUILD_ALSA
ifeq ($(strip $(BOARD_USES_ALSA_AUDIO)),true) ifeq ($(strip $(BOARD_USES_ALSA_AUDIO)),true)
LOCAL_SRC_FILES += audiofilters/alsa.c LOCAL_SRC_FILES += audiofilters/alsa.c
...@@ -291,7 +295,11 @@ ifeq ($(BUILD_MEDIASTREAMER2_SDK), 1) ...@@ -291,7 +295,11 @@ ifeq ($(BUILD_MEDIASTREAMER2_SDK), 1)
LOCAL_SHARED_LIBRARIES += libzrtpcpp LOCAL_SHARED_LIBRARIES += libzrtpcpp
endif endif
LOCAL_LDLIBS += -lOpenSLES -llog -ldl ifeq ($(BUILD_OPENSLES_SOUNDCARD),1)
LOCAL_LDLIBS += -lOpenSLES
endif
LOCAL_LDLIBS += -llog -ldl
LOCAL_MODULE_FILENAME := libmediastreamer2-$(TARGET_ARCH_ABI) LOCAL_MODULE_FILENAME := libmediastreamer2-$(TARGET_ARCH_ABI)
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
else else
......
...@@ -137,7 +137,9 @@ static MSSndCardDesc * ms_snd_card_descs[]={ ...@@ -137,7 +137,9 @@ static MSSndCardDesc * ms_snd_card_descs[]={
&aq_card_desc, &aq_card_desc,
#endif #endif
#ifdef ANDROID #ifdef ANDROID
#ifdef __OPENSLES_ENABLED__
&android_native_snd_opensles_card_desc, &android_native_snd_opensles_card_desc,
#endif
&android_native_snd_card_desc, &android_native_snd_card_desc,
&msandroid_sound_card_desc, &msandroid_sound_card_desc,
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment