From 7986b0872e2f6be7c9cb9d85ef2684c767ba245a Mon Sep 17 00:00:00 2001 From: Andrew Hsieh Date: Mon, 12 May 2014 11:57:33 +0800 Subject: [PATCH] Fixes samples Teapot/MoreTeapots armeabi-v7a-hard; native-audio debug build Fixes two issues: 1. Remove redundant check for hard-float in Teapot/MoreTeapots and ndk_helper they depend. The ndk-build system add those flags already for armeabi-v7a-hard 2. native-audio in debug build: assert on the non-existance var Change-Id: Id6b2d38a264c2f2d0e0c7fe625991fcee1762800 --- ndk/platforms/android-17/samples/Teapot/jni/Android.mk | 8 -------- .../android-18/samples/MoreTeapots/jni/Android.mk | 10 +--------- .../samples/native-audio/jni/native-audio-jni.c | 2 +- ndk/sources/android/ndk_helper/Android.mk | 10 ---------- 4 files changed, 2 insertions(+), 28 deletions(-) diff --git a/ndk/platforms/android-17/samples/Teapot/jni/Android.mk b/ndk/platforms/android-17/samples/Teapot/jni/Android.mk index c35ab3711..583743f97 100644 --- a/ndk/platforms/android-17/samples/Teapot/jni/Android.mk +++ b/ndk/platforms/android-17/samples/Teapot/jni/Android.mk @@ -13,14 +13,6 @@ LOCAL_CFLAGS := LOCAL_LDLIBS := -llog -landroid -lEGL -lGLESv2 LOCAL_STATIC_LIBRARIES := cpufeatures android_native_app_glue ndk_helper -ifneq ($(filter %armeabi-v7a,$(TARGET_ARCH_ABI)),) -LOCAL_CFLAGS += -mhard-float -D_NDK_MATH_NO_SOFTFP=1 -LOCAL_LDLIBS += -lm_hard -ifeq (,$(filter -fuse-ld=mcld,$(APP_LDFLAGS) $(LOCAL_LDFLAGS))) -LOCAL_LDFLAGS += -Wl,--no-warn-mismatch -endif -endif - include $(BUILD_SHARED_LIBRARY) $(call import-module,android/ndk_helper) diff --git a/ndk/platforms/android-18/samples/MoreTeapots/jni/Android.mk b/ndk/platforms/android-18/samples/MoreTeapots/jni/Android.mk index b4457b9a9..25b307112 100644 --- a/ndk/platforms/android-18/samples/MoreTeapots/jni/Android.mk +++ b/ndk/platforms/android-18/samples/MoreTeapots/jni/Android.mk @@ -6,20 +6,12 @@ LOCAL_MODULE := MoreTeapotsNativeActivity LOCAL_SRC_FILES := MoreTeapotsNativeActivity.cpp \ MoreTeapotsRenderer.cpp \ -LOCAL_C_INCLUDES := +LOCAL_C_INCLUDES := LOCAL_CFLAGS := LOCAL_LDLIBS := -llog -landroid -lEGL -lGLESv2 LOCAL_STATIC_LIBRARIES := cpufeatures android_native_app_glue ndk_helper -ifneq ($(filter %armeabi-v7a,$(TARGET_ARCH_ABI)),) -LOCAL_CFLAGS += -mhard-float -D_NDK_MATH_NO_SOFTFP=1 -LOCAL_LDLIBS += -lm_hard -ifeq (,$(filter -fuse-ld=mcld,$(APP_LDFLAGS) $(LOCAL_LDFLAGS))) -LOCAL_LDFLAGS += -Wl,--no-warn-mismatch -endif -endif - include $(BUILD_SHARED_LIBRARY) $(call import-module,android/ndk_helper) diff --git a/ndk/platforms/android-9/samples/native-audio/jni/native-audio-jni.c b/ndk/platforms/android-9/samples/native-audio/jni/native-audio-jni.c index 5e7946b10..da07ad15e 100644 --- a/ndk/platforms/android-9/samples/native-audio/jni/native-audio-jni.c +++ b/ndk/platforms/android-9/samples/native-audio/jni/native-audio-jni.c @@ -133,7 +133,7 @@ void bqPlayerCallback(SLAndroidSimpleBufferQueueItf bq, void *context) // this callback handler is called every time a buffer finishes recording void bqRecorderCallback(SLAndroidSimpleBufferQueueItf bq, void *context) { - assert(bq == bqRecorderBufferQueue); + assert(bq == recorderBufferQueue); assert(NULL == context); // for streaming recording, here we would call Enqueue to give recorder the next buffer to fill // but instead, this is a one-time buffer so we stop recording diff --git a/ndk/sources/android/ndk_helper/Android.mk b/ndk/sources/android/ndk_helper/Android.mk index 98dc1bea8..e7134da3b 100644 --- a/ndk/sources/android/ndk_helper/Android.mk +++ b/ndk/sources/android/ndk_helper/Android.mk @@ -10,16 +10,6 @@ LOCAL_EXPORT_LDLIBS := -llog -landroid -lEGL -lGLESv2 LOCAL_STATIC_LIBRARIES := cpufeatures android_native_app_glue - -ifneq ($(filter %armeabi-v7a,$(TARGET_ARCH_ABI)),) -LOCAL_CFLAGS += -mhard-float -D_NDK_MATH_NO_SOFTFP=1 -LOCAL_EXPORT_CFLAGS += -mhard-float -D_NDK_MATH_NO_SOFTFP=1 -LOCAL_EXPORT_LDLIBS += -lm_hard -ifeq (,$(filter -fuse-ld=mcld,$(APP_LDFLAGS) $(LOCAL_LDFLAGS))) -LOCAL_EXPORT_LDFLAGS += -Wl,--no-warn-mismatch -endif -endif - include $(BUILD_STATIC_LIBRARY) #$(call import-module,android/native_app_glue)