概述
下载好源码后,在源码目录建立Android.mk soxr-config.h
Android.mk 内容如下
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libsoxr
LOCAL_SRC_FILES := src/soxr.c
src/data-io.c
src/dbesi0.c
src/filter.c
src/fft4g64.c
src/cr.c
src/cr32.c
src/fft4g32.c
src/cr64.c
src/vr32.c
src/cr32s.c
src/pffft32s.c
src/util32s.c
LOCAL_C_INCLUDES := $(LOCAL_PATH)/ $(LOCAL_PATH)/src
LOCAL_LDLIBS +=
LOCAL_CFLAGS += -pie -fPIE -fPIC -DSOXR_LIB -DSOXR_VISIBILITY -Dsoxr_lsr_EXPORTS -mfloat-abi=softfp -mfpu=neon
LOCAL_LDFLAGS += -pie -fPIE -lz -llog
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := soxr-test
LOCAL_SRC_FILES := examples/2-stream.c
LOCAL_C_INCLUDES := $(LOCAL_PATH)/ $(LOCAL_PATH)/src
LOCAL_SHARED_LIBRARIES := libsoxr
LOCAL_LDLIBS +=
LOCAL_CFLAGS += -fPIE
LOCAL_LDFLAGS += -fPIE -pie
include $(BUILD_EXECUTABLE)
soxr-config.h内容
#if !defined soxr_config_included
#define soxr_config_included
#define AVCODEC_FOUND 0
#define AVUTIL_FOUND 0
#define WITH_PFFFT 1
#define HAVE_FENV_H 1
#define HAVE_STDBOOL_H 1
#define HAVE_STDINT_H 1
#define HAVE_LRINT 1
#define HAVE_BIGENDIAN 0
#define WITH_CR32 1
#define WITH_CR32S 1
#define WITH_CR64 1
#define WITH_CR64S 0
#define WITH_VR32 1
#define WITH_HI_PREC_CLOCK 1
#define WITH_FLOAT_STD_PREC_CLOCK 0
#define WITH_DEV_TRACE 1
#endif
然后就可以用ndk编译了.
也可以去下载改好的代码
运行里面的编译脚本就好
https://download.csdn.net/download/lwhiii/10790759
最后
以上就是寂寞草莓为你收集整理的libsoxr Android编译方法的全部内容,希望文章能够帮你解决libsoxr Android编译方法所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复