It doesn't seem to be possible to use the prefab version with ndk-build, but it's not difficult to build OBOE from source. First, clone the oboe repository. Then translate the CMakeLists.txt
file included with OBOE to Android.mk
. The result would look something like this:
LOCAL_MODULE := OBOE
OBOE_PATH := <path to oboe>
LOCAL_SRC_FILES := $(OBOE_PATH)/src/aaudio/AAudioLoader.cpp <all oboe sources...>
LOCAL_C_INCLUDES := $(OBOE_PATH)/src $(OBOE_PATH)/include
LOCAL_EXPORT_C_INCLUDES := $(OBOE_PATH)/include
LOCAL_CFLAGS := -std=c++17 -Ofast
LOCAL_LDLIBS := -llog -lOpenSLES
include $(BUILD_SHARED_LIBRARY)
Then reference OBOE from your main module:
LOCAL_SHARED_LIBRARIES := OBOE