当前位置: 代码迷 >> Android >> 大牛呀,给个soundTouch的demo吧!解决方案
  详细解决方案

大牛呀,给个soundTouch的demo吧!解决方案

热度:74   发布时间:2016-05-01 15:07:26.0
大牛呀,给个soundTouch的demo吧!
基于soundTouch做点东西,C++不熟悉,请各位给个demo或者相关的资料也可 [email protected] 谢谢!

------解决方案--------------------
Android 的 AudioTrack本身可以改变音速,高低音等等。这些不够用么?
soundTouch貌似没有现成的Android整合,你得自己从ndk开始编译。
------解决方案--------------------
For Android compilation, download Android NDK and prepare SoundTouch library as follows:

Switch off exception handling as Android does not support C++ exceptions. That's easiest done by taking latest source codes and defining ST_NO_EXCEPTION_HANDLING either as -D compiler flag, or #define that in STTypes.h file

Add *.cpp files from SoundTouch library to your Android.mk file

Add copyright notice about usage of SoundTouch library into your application about information to comply with the license

That's it, SoundTouch compiles and is ready for use.

Android.mk文件:
C/C++ code
include $(CLEAR_VARS)LOCAL_PATH:= $(call my-dir)LOCAL_CPP_FEATURES += -fno-exceptionsLOCAL_SRC_FILES := \     SoundTouch/AAFilter.cpp \     SoundTouch/BPMDetect.cpp \     SoundTouch/cpu_detect_x86.cpp\      SoundTouch/FIFOSampleBuffer.cpp \      SoundTouch/FIRFilter.cpp \      SoundTouch/mmx_optimized.cpp \      SoundTouch/PeakFinder.cpp \      SoundTouch/RateTransposer.cpp \      SoundTouch/SoundTouch.cpp \      SoundTouch/sse_optimized.cpp \      SoundTouch/TDStretch.cpp LOCAL_MODULE := libSoundTouchLOCAL_C_INCLUDES := include/BPMDetect.h include/FIFOSampleBuffer.h include/FIFOSamplePipe.h include/SoundTouch.h include/STTypes.hinclude $(BUILD_SHARED_LIBRARY)
  相关解决方案