标签:android app 文件夹复制 point pre png https arc ant
首先去官网
https://www.speex.org/downloads/
下载解压
将include、libspeex文件夹复制到自己新建工程的jni目录下
在jni目录下新增Android.mk文件,复制如下内容,Android.mk中记录了待编译的源文件的路
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libspeex
LOCAL_CFLAGS = -DFIXED_POINT -DUSE_KISS_FFT -DEXPORT="" -UHAVE_CONFIG_H
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
#LOCAL_SRC_FILES :=
LOCAL_SRC_FILES :=./libspeex/bits.c ./libspeex/cb_search.c ./libspeex/exc_10_16_table.c ./libspeex/exc_10_32_table.c ./libspeex/exc_20_32_table.c ./libspeex/exc_5_256_table.c ./libspeex/exc_5_64_table.c ./libspeex/exc_8_128_table.c ./libspeex/filters.c ./libspeex/gain_table_lbr.c ./libspeex/gain_table.c ./libspeex/hexc_10_32_table.c ./libspeex/hexc_table.c ./libspeex/high_lsp_tables.c ./libspeex/kiss_fft.c ./libspeex/kiss_fftr.c ./libspeex/lpc.c ./libspeex/lsp_tables_nb.c ./libspeex/lsp.c ./libspeex/ltp.c ./libspeex/modes_wb.c ./libspeex/modes.c ./libspeex/nb_celp.c ./libspeex/quant_lsp.c ./libspeex/sb_celp.c ./libspeex/smallft.c ./libspeex/speex_callbacks.c ./libspeex/speex_header.c ./libspeex/speex.c ./libspeex/stereo.c ./libspeex/vbr.c ./libspeex/vorbis_psy.c ./libspeex/vq.c ./libspeex/window.c
include $(BUILD_SHARED_LIBRARY)
在jni下创建Application.mk,并添加如下内容,编译所有平台下的so文件
APP_ABI := all
在jni/include/speex/目录下新增speex_config_types.h文件,复制内容如下
#ifndef __SPEEX_TYPES_H__ #define __SPEEX_TYPES_H__ typedef short spx_int16_t; typedef unsigned short spx_uint16_t; typedef int spx_int32_t; typedef unsigned int spx_uint32_t; #endif
在命令行输入ndk-build
开始编译
在libs目录下面生成
标签:android app 文件夹复制 point pre png https arc ant
原文地址:http://www.cnblogs.com/mingfeng002/p/7800439.html