https://nchc.dl.sourceforge.net/project/opencore-amr/fdk-aac/fdk-aac-0.1.4.tar.gz
下载完成后在linux服务器中解压,我解压后的目录为
/home/dockdroid/dockdroid_code/temp/fdk-aac-0.1.4
在解压后的目录里添加配置编译脚本:build_32.sh
NDK_HOME=/home/dockdroid/dockdroid_code/temp/android-ndk-r14b ANDROID_API=android-24 SYSROOT=$NDK_HOME/platforms/$ANDROID_API/arch-arm ANDROID_BIN=$NDK_HOME/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/ CROSS_COMPILE=${ANDROID_BIN}/arm-linux-androideabi- ARM_INC=$SYSROOT/usr/include ARM_LIB=$SYSROOT/usr/lib LDFLAGS=" -nostdlib -Bdynamic -Wl,--whole-archive -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,nocopyreloc -Wl,-soname,/system/lib/libz.so -Wl,-rpath-link=$ARM_LIB,-dynamic-linker=/system/bin/linker -L$NDK_HOME/sources/cxx-stl/gnu-libstdc++/libs/armeabi -L$NDK_HOME/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86/arm-linux-androideabi/lib -L$ARM_LIB -lc -lgcc -lm -ldl " FLAGS="--host=arm-androideabi-linux --enable-static --disable-shared" export CXX="${CROSS_COMPILE}g++ --sysroot=${SYSROOT}" export LDFLAGS="$LDFLAGS" export CC="${CROSS_COMPILE}gcc --sysroot=${SYSROOT}" ./configure $FLAGS \ --prefix='/home/dockdroid/dockdroid_code/temp/fdk-aac-0.1.4' make clean make -j48 make install
其实就是Android系统Mediacodec里的aac,其源码目录在external/aac中。