首页 > 其他 > 详细

speex编译

时间:2017-11-08 19:18:44      阅读:261      评论:0      收藏:0      [点我收藏+]

 

首先去官网 

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目录下面生成

技术分享

speex编译

原文:http://www.cnblogs.com/mingfeng002/p/7800439.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!