├── app
├── .gitignore
├── src
│ ├── main
│ │ ├── jni
│ │ │ ├── include
│ │ │ │ ├── Makefile.am
│ │ │ │ └── speex
│ │ │ │ │ ├── speexdsp_config_types.h
│ │ │ │ │ ├── Makefile.am
│ │ │ │ │ ├── speex_buffer.h
│ │ │ │ │ └── speexdsp_types.h
│ │ │ ├── Application.mk
│ │ │ ├── libspeexdsp
│ │ │ │ ├── bfin.h
│ │ │ │ ├── kiss_fftr.h
│ │ │ │ ├── testecho.c
│ │ │ │ ├── Makefile.am
│ │ │ │ ├── smallft.h
│ │ │ │ ├── testdenoise.c
│ │ │ │ ├── testjitter.c
│ │ │ │ ├── echo_diagnostic.m
│ │ │ │ ├── misc_bfin.h
│ │ │ │ ├── fftwrap.h
│ │ │ │ ├── filterbank.h
│ │ │ │ ├── testresample.c
│ │ │ │ ├── kiss_fft.h
│ │ │ │ ├── vorbis_psy.h
│ │ │ │ ├── stack_alloc.h
│ │ │ │ ├── fixed_arm4.h
│ │ │ │ ├── resample_sse.h
│ │ │ │ ├── buffer.c
│ │ │ │ ├── fixed_bfin.h
│ │ │ │ ├── fixed_generic.h
│ │ │ │ ├── os_support.h
│ │ │ │ └── fixed_arm5e.h
│ │ │ ├── Android.mk
│ │ │ └── speex_process.c
│ │ ├── res
│ │ │ ├── values
│ │ │ │ ├── strings.xml
│ │ │ │ ├── colors.xml
│ │ │ │ └── styles.xml
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ └── layout
│ │ │ │ ├── activity_main.xml
│ │ │ │ └── content_main.xml
│ │ ├── libs
│ │ │ ├── x86
│ │ │ │ └── libspeexdsp.so
│ │ │ ├── armeabi
│ │ │ │ └── libspeexdsp.so
│ │ │ └── armeabi-v7a
│ │ │ │ └── libspeexdsp.so
│ │ ├── obj
│ │ │ └── local
│ │ │ │ ├── x86
│ │ │ │ ├── libspeexdsp.so
│ │ │ │ └── objs
│ │ │ │ │ └── speexdsp
│ │ │ │ │ ├── speex_process.o
│ │ │ │ │ ├── libspeexdsp
│ │ │ │ │ ├── mdf.o
│ │ │ │ │ ├── scal.o
│ │ │ │ │ ├── buffer.o
│ │ │ │ │ ├── fftwrap.o
│ │ │ │ │ ├── jitter.o
│ │ │ │ │ ├── smallft.o
│ │ │ │ │ ├── filterbank.o
│ │ │ │ │ ├── kiss_fft.o
│ │ │ │ │ ├── kiss_fftr.o
│ │ │ │ │ ├── preprocess.o
│ │ │ │ │ ├── resample.o
│ │ │ │ │ ├── smallft.o.d
│ │ │ │ │ ├── buffer.o.d
│ │ │ │ │ ├── jitter.o.d
│ │ │ │ │ ├── fftwrap.o.d
│ │ │ │ │ ├── filterbank.o.d
│ │ │ │ │ ├── resample.o.d
│ │ │ │ │ ├── scal.o.d
│ │ │ │ │ ├── kiss_fft.o.d
│ │ │ │ │ ├── mdf.o.d
│ │ │ │ │ ├── kiss_fftr.o.d
│ │ │ │ │ └── preprocess.o.d
│ │ │ │ │ └── speex_process.o.d
│ │ │ │ ├── armeabi
│ │ │ │ ├── libspeexdsp.so
│ │ │ │ └── objs
│ │ │ │ │ └── speexdsp
│ │ │ │ │ ├── speex_process.o
│ │ │ │ │ ├── libspeexdsp
│ │ │ │ │ ├── mdf.o
│ │ │ │ │ ├── buffer.o
│ │ │ │ │ ├── jitter.o
│ │ │ │ │ ├── scal.o
│ │ │ │ │ ├── fftwrap.o
│ │ │ │ │ ├── kiss_fft.o
│ │ │ │ │ ├── resample.o
│ │ │ │ │ ├── smallft.o
│ │ │ │ │ ├── filterbank.o
│ │ │ │ │ ├── kiss_fftr.o
│ │ │ │ │ ├── preprocess.o
│ │ │ │ │ ├── smallft.o.d
│ │ │ │ │ ├── buffer.o.d
│ │ │ │ │ ├── jitter.o.d
│ │ │ │ │ ├── fftwrap.o.d
│ │ │ │ │ ├── filterbank.o.d
│ │ │ │ │ ├── resample.o.d
│ │ │ │ │ ├── scal.o.d
│ │ │ │ │ ├── kiss_fft.o.d
│ │ │ │ │ ├── mdf.o.d
│ │ │ │ │ ├── kiss_fftr.o.d
│ │ │ │ │ └── preprocess.o.d
│ │ │ │ │ └── speex_process.o.d
│ │ │ │ └── armeabi-v7a
│ │ │ │ ├── libspeexdsp.so
│ │ │ │ └── objs
│ │ │ │ └── speexdsp
│ │ │ │ ├── speex_process.o
│ │ │ │ ├── libspeexdsp
│ │ │ │ ├── mdf.o
│ │ │ │ ├── scal.o
│ │ │ │ ├── buffer.o
│ │ │ │ ├── fftwrap.o
│ │ │ │ ├── jitter.o
│ │ │ │ ├── smallft.o
│ │ │ │ ├── kiss_fft.o
│ │ │ │ ├── kiss_fftr.o
│ │ │ │ ├── resample.o
│ │ │ │ ├── filterbank.o
│ │ │ │ ├── preprocess.o
│ │ │ │ ├── smallft.o.d
│ │ │ │ ├── buffer.o.d
│ │ │ │ ├── jitter.o.d
│ │ │ │ ├── fftwrap.o.d
│ │ │ │ ├── filterbank.o.d
│ │ │ │ ├── resample.o.d
│ │ │ │ ├── scal.o.d
│ │ │ │ ├── kiss_fft.o.d
│ │ │ │ ├── mdf.o.d
│ │ │ │ ├── kiss_fftr.o.d
│ │ │ │ └── preprocess.o.d
│ │ │ │ └── speex_process.o.d
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── cyril
│ │ │ │ └── speexnoisecancel
│ │ │ │ ├── permission
│ │ │ │ ├── IPermissionFailed.java
│ │ │ │ ├── IPermissionSuccess.java
│ │ │ │ ├── IPermissionAlwaysDenied.java
│ │ │ │ └── PermissionManager.java
│ │ │ │ ├── Speex.java
│ │ │ │ └── UPlayer.java
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── cyril
│ │ │ └── speexnoisecancel
│ │ │ └── ExampleUnitTest.java
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── cyril
│ │ └── speexnoisecancel
│ │ └── ExampleInstrumentedTest.java
├── proguard-rules.pro
└── build.gradle
├── settings.gradle
├── .idea
├── dictionaries
│ ├── xuan.xml
│ └── kevinliu.xml
├── copyright
│ └── profiles_settings.xml
├── caches
│ └── build_file_checksums.ser
├── vcs.xml
├── modules.xml
├── runConfigurations.xml
├── gradle.xml
├── compiler.xml
├── inspectionProfiles
│ └── Project_Default.xml
├── codeStyles
│ └── Project.xml
└── misc.xml
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── .gitignore
├── README.md
├── gradle.properties
├── gradlew.bat
└── gradlew
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/app/src/main/jni/include/Makefile.am:
--------------------------------------------------------------------------------
1 |
2 | SUBDIRS = speex
3 |
--------------------------------------------------------------------------------
/app/src/main/jni/Application.mk:
--------------------------------------------------------------------------------
1 | APP_ABI := armeabi armeabi-v7a x86
--------------------------------------------------------------------------------
/.idea/dictionaries/xuan.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/.idea/dictionaries/kevinliu.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | SpeexNoiseCancel
3 |
4 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/.idea/caches/build_file_checksums.ser:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/.idea/caches/build_file_checksums.ser
--------------------------------------------------------------------------------
/app/src/main/libs/x86/libspeexdsp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/libs/x86/libspeexdsp.so
--------------------------------------------------------------------------------
/app/src/main/libs/armeabi/libspeexdsp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/libs/armeabi/libspeexdsp.so
--------------------------------------------------------------------------------
/app/src/main/obj/local/x86/libspeexdsp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/x86/libspeexdsp.so
--------------------------------------------------------------------------------
/app/src/main/libs/armeabi-v7a/libspeexdsp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/libs/armeabi-v7a/libspeexdsp.so
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi/libspeexdsp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/armeabi/libspeexdsp.so
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi-v7a/libspeexdsp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/armeabi-v7a/libspeexdsp.so
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 | .externalNativeBuild
10 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/obj/local/x86/objs/speexdsp/speex_process.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/x86/objs/speexdsp/speex_process.o
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Speex Denoise
2 | 这是一个利用Speex库在Android上消除录音噪音的Demo
3 |
4 |
5 |
6 | Demo比较简单,用AudioRecord录制声音,边录制边消除噪音,得到的原始音频数据最后保存成wav文件,speex已经编译成lib库,除噪的代码在jni层c语言编写,代码都可编辑。亲测,效果还可以。
7 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi/objs/speexdsp/speex_process.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/armeabi/objs/speexdsp/speex_process.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/mdf.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/mdf.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/scal.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/scal.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/mdf.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/mdf.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/buffer.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/buffer.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/fftwrap.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/fftwrap.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/jitter.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/jitter.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/smallft.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/smallft.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/speex_process.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/speex_process.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/buffer.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/buffer.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/jitter.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/jitter.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/scal.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/scal.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/filterbank.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/filterbank.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/kiss_fft.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/kiss_fft.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/kiss_fftr.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/kiss_fftr.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/preprocess.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/preprocess.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/resample.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/resample.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/mdf.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/mdf.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/scal.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/scal.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/fftwrap.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/fftwrap.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/kiss_fft.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/kiss_fft.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/resample.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/resample.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/smallft.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/smallft.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/buffer.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/buffer.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/fftwrap.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/fftwrap.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/jitter.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/jitter.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/smallft.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/smallft.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/filterbank.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/filterbank.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/kiss_fftr.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/kiss_fftr.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/preprocess.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/preprocess.o
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/kiss_fft.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/kiss_fft.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/kiss_fftr.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/kiss_fftr.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/resample.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/resample.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/filterbank.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/filterbank.o
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/preprocess.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kevinliu001/Android-SpeexDenoise/HEAD/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/preprocess.o
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/jni/include/speex/speexdsp_config_types.h:
--------------------------------------------------------------------------------
1 | #ifndef __SPEEX_TYPES_H__
2 | #define __SPEEX_TYPES_H__
3 | typedef short spx_int16_t;
4 | typedef unsigned short spx_uint16_t;
5 | typedef int spx_int32_t;
6 | typedef unsigned int spx_uint32_t;
7 | #endif
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/java/com/cyril/speexnoisecancel/permission/IPermissionFailed.java:
--------------------------------------------------------------------------------
1 | package com.cyril.speexnoisecancel.permission;
2 |
3 | /**
4 | * @author kevinliu
5 | */
6 | public interface IPermissionFailed {
7 |
8 | /**
9 | * 获取权限失败
10 | */
11 | void onFailed();
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/main/java/com/cyril/speexnoisecancel/permission/IPermissionSuccess.java:
--------------------------------------------------------------------------------
1 | package com.cyril.speexnoisecancel.permission;
2 |
3 | /**
4 | *
5 | * @author KevinLiu
6 | * @date 2018/1/31
7 | */
8 |
9 | public interface IPermissionSuccess {
10 | /**
11 | * 获取权限成功
12 | */
13 | void onSuccess();
14 | }
15 |
--------------------------------------------------------------------------------
/app/src/main/java/com/cyril/speexnoisecancel/Speex.java:
--------------------------------------------------------------------------------
1 | package com.cyril.speexnoisecancel;
2 |
3 | class Speex {
4 |
5 | Speex() {
6 | }
7 |
8 | static {
9 | System.loadLibrary("speexdsp");
10 | }
11 |
12 | native void CancelNoiseInit(int frame_size,int sample_rate);
13 | native void CancelNoisePreprocess(byte[] inbuffer);
14 | native void CancelNoiseDestroy();
15 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/cyril/speexnoisecancel/permission/IPermissionAlwaysDenied.java:
--------------------------------------------------------------------------------
1 | package com.cyril.speexnoisecancel.permission;
2 |
3 | /**
4 | * @author kevinliu
5 | */
6 | public interface IPermissionAlwaysDenied {
7 |
8 | /**
9 | * 用户选择了拒绝并且选择不再提示
10 | * @return 返回true表示需要提示到系统设置去打开权限
11 | */
12 | boolean onAlwaysDeniedShowSetting();
13 | }
14 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Thu Mar 07 15:11:53 CST 2019
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | >>>>>>>=363492f23122e21ed94b8de89551d1d95b39d6d4
5 | zipStoreBase=GRADLE_USER_HOME
6 | zipStorePath=wrapper/dists
7 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
8 | =\=\=\=\=\=\=
9 | <<<<<<<=HEAD
10 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/jni/libspeexdsp/bfin.h:
--------------------------------------------------------------------------------
1 | /* Common Blackfin assembly defines
2 | *
3 | * Copyright (C) 2005-2009 Analog Devices
4 | */
5 |
6 | #if __GNUC__ <= 3
7 | /* GCC-3.4 and older did not use hardware loops and thus did not have
8 | * register constraints for declaring clobbers.
9 | */
10 | # define BFIN_HWLOOP0_REGS
11 | # define BFIN_HWLOOP1_REGS
12 | #else
13 | # define BFIN_HWLOOP0_REGS , "LB0", "LT0", "LC0"
14 | # define BFIN_HWLOOP1_REGS , "LB1", "LT1", "LC1"
15 | #endif
16 |
--------------------------------------------------------------------------------
/app/src/test/java/com/cyril/speexnoisecancel/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.cyril.speexnoisecancel;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/jni/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 | include $(CLEAR_VARS)
3 | LOCAL_MODULE := libspeexdsp
4 | LOCAL_CFLAGS = -DFIXED_POINT -DUSE_KISS_FFT -DEXPORT="" -UHAVE_CONFIG_H
5 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
6 |
7 | LOCAL_SRC_FILES := \
8 | ./libspeexdsp/buffer.c \
9 | ./libspeexdsp/fftwrap.c \
10 | ./libspeexdsp/filterbank.c \
11 | ./libspeexdsp/jitter.c \
12 | ./libspeexdsp/kiss_fft.c \
13 | ./libspeexdsp/kiss_fftr.c \
14 | ./libspeexdsp/mdf.c \
15 | ./libspeexdsp/preprocess.c \
16 | ./libspeexdsp/resample.c \
17 | ./libspeexdsp/scal.c \
18 | ./libspeexdsp/smallft.c \
19 | ./speex_process.c
20 |
21 | LOCAL_LDLIBS := -llog -lz
22 |
23 | include $(BUILD_SHARED_LIBRARY)
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/app/src/main/jni/include/speex/Makefile.am:
--------------------------------------------------------------------------------
1 | # Disable automatic dependency tracking if using other tools than gcc and gmake
2 | #AUTOMAKE_OPTIONS = no-dependencies
3 |
4 | # Historically, these headers were part of the speex package, so in order to
5 | # keep compatibility with existing software we need to keep installing them
6 | # in the same place as they were found then. If new functionality, with new
7 | # headers, are added later, some thought should be given as to whether they
8 | # should instead go somewhere other than $prefix/include/speex.
9 |
10 | speexincludedir = $(includedir)/speex
11 |
12 | nodist_speexinclude_HEADERS = speexdsp_config_types.h
13 |
14 | speexinclude_HEADERS = speex_echo.h speex_jitter.h speex_preprocess.h speex_resampler.h \
15 | speexdsp_types.h
16 |
17 | noinst_HEADERS=speex_buffer.h
18 |
19 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/cyril/speexnoisecancel/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.cyril.speexnoisecancel;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.cyril.speexnoisecancel", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/xuan/Library/Android/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/x86/objs/speexdsp/speex_process.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/x86/objs/speexdsp/./speex_process.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./speex_process.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_preprocess.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h
6 |
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_preprocess.h:
8 |
9 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
10 |
11 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
12 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi/objs/speexdsp/speex_process.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/armeabi/objs/speexdsp/./speex_process.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./speex_process.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_preprocess.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h
6 |
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_preprocess.h:
8 |
9 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
10 |
11 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
12 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/speex_process.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/./speex_process.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./speex_process.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_preprocess.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h
6 |
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_preprocess.h:
8 |
9 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
10 |
11 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
12 |
--------------------------------------------------------------------------------
/app/src/main/jni/libspeexdsp/kiss_fftr.h:
--------------------------------------------------------------------------------
1 | #ifndef KISS_FTR_H
2 | #define KISS_FTR_H
3 |
4 | #include "kiss_fft.h"
5 | #ifdef __cplusplus
6 | extern "C" {
7 | #endif
8 |
9 |
10 | /*
11 |
12 | Real optimized version can save about 45% cpu time vs. complex fft of a real seq.
13 |
14 |
15 |
16 | */
17 |
18 | typedef struct kiss_fftr_state *kiss_fftr_cfg;
19 |
20 |
21 | kiss_fftr_cfg kiss_fftr_alloc(int nfft,int inverse_fft,void * mem, size_t * lenmem);
22 | /*
23 | nfft must be even
24 |
25 | If you don't care to allocate space, use mem = lenmem = NULL
26 | */
27 |
28 |
29 | void kiss_fftr(kiss_fftr_cfg cfg,const kiss_fft_scalar *timedata,kiss_fft_cpx *freqdata);
30 | /*
31 | input timedata has nfft scalar points
32 | output freqdata has nfft/2+1 complex points
33 | */
34 |
35 | void kiss_fftr2(kiss_fftr_cfg st,const kiss_fft_scalar *timedata,kiss_fft_scalar *freqdata);
36 |
37 | void kiss_fftri(kiss_fftr_cfg cfg,const kiss_fft_cpx *freqdata,kiss_fft_scalar *timedata);
38 |
39 | void kiss_fftri2(kiss_fftr_cfg st,const kiss_fft_scalar *freqdata, kiss_fft_scalar *timedata);
40 |
41 | /*
42 | input freqdata has nfft/2+1 complex points
43 | output timedata has nfft scalar points
44 | */
45 |
46 | #define kiss_fftr_free speex_free
47 |
48 | #ifdef __cplusplus
49 | }
50 | #endif
51 | #endif
52 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 28
5 | defaultConfig {
6 | applicationId "com.cyril.speexnoisecancel"
7 | minSdkVersion 21
8 | targetSdkVersion 28
9 | versionCode 1
10 | versionName "1.0"
11 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
12 | }
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | sourceSets{
20 | main{
21 | jni.srcDirs=[]
22 | jniLibs.srcDirs = ['src/main/libs'] // 配置此处才会打包jni 的.so 文件
23 | }
24 | }
25 |
26 | //此配置Studio会自动编译生成.so文件,并自动打包到apk中
27 | // externalNativeBuild {
28 | // ndkBuild {
29 | // path file('src/main/jni/Android.mk')
30 | // }
31 | // }
32 | }
33 |
34 | dependencies {
35 | implementation fileTree(dir: 'libs', include: ['*.jar'])
36 | androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
37 | exclude group: 'com.android.support', module: 'support-annotations'
38 | })
39 | implementation 'com.android.support:appcompat-v7:28.0.0'
40 | implementation 'com.android.support.constraint:constraint-layout:1.0.2'
41 | api 'com.yanzhenjie:permission:2.0.0-rc12'
42 | testImplementation 'junit:junit:4.12'
43 | }
44 |
--------------------------------------------------------------------------------
/app/src/main/jni/libspeexdsp/testecho.c:
--------------------------------------------------------------------------------
1 | #ifdef HAVE_CONFIG_H
2 | #include "config.h"
3 | #endif
4 |
5 | #include "speex/speex_echo.h"
6 | #include "speex/speex_preprocess.h"
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 |
13 |
14 | #define NN 128
15 | #define TAIL 1024
16 |
17 | int main(int argc, char **argv)
18 | {
19 | FILE *echo_fd, *ref_fd, *e_fd;
20 | short echo_buf[NN], ref_buf[NN], e_buf[NN];
21 | SpeexEchoState *st;
22 | SpeexPreprocessState *den;
23 | int sampleRate = 8000;
24 |
25 | if (argc != 4)
26 | {
27 | fprintf(stderr, "testecho mic_signal.sw speaker_signal.sw output.sw\n");
28 | exit(1);
29 | }
30 | echo_fd = fopen(argv[2], "rb");
31 | ref_fd = fopen(argv[1], "rb");
32 | e_fd = fopen(argv[3], "wb");
33 |
34 | st = speex_echo_state_init(NN, TAIL);
35 | den = speex_preprocess_state_init(NN, sampleRate);
36 | speex_echo_ctl(st, SPEEX_ECHO_SET_SAMPLING_RATE, &sampleRate);
37 | speex_preprocess_ctl(den, SPEEX_PREPROCESS_SET_ECHO_STATE, st);
38 |
39 | while (!feof(ref_fd) && !feof(echo_fd))
40 | {
41 | fread(ref_buf, sizeof(short), NN, ref_fd);
42 | fread(echo_buf, sizeof(short), NN, echo_fd);
43 | speex_echo_cancellation(st, ref_buf, echo_buf, e_buf);
44 | speex_preprocess_run(den, e_buf);
45 | fwrite(e_buf, sizeof(short), NN, e_fd);
46 | }
47 | speex_echo_state_destroy(st);
48 | speex_preprocess_state_destroy(den);
49 | fclose(e_fd);
50 | fclose(echo_fd);
51 | fclose(ref_fd);
52 | return 0;
53 | }
54 |
--------------------------------------------------------------------------------
/.idea/inspectionProfiles/Project_Default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/app/src/main/jni/libspeexdsp/Makefile.am:
--------------------------------------------------------------------------------
1 | # Disable automatic dependency tracking if using other tools than gcc and gmake
2 | #AUTOMAKE_OPTIONS = no-dependencies
3 |
4 | EXTRA_DIST=echo_diagnostic.m
5 |
6 | AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include/speex -I$(top_builddir) @FFT_CFLAGS@
7 |
8 | lib_LTLIBRARIES = libspeexdsp.la
9 |
10 | # Sources for compilation in the library
11 | if BUILD_KISS_FFT
12 | FFTSRC=kiss_fft.c _kiss_fft_guts.h kiss_fft.h kiss_fftr.c kiss_fftr.h
13 | else
14 | if BUILD_SMALLFT
15 | FFTSRC=smallft.c
16 | else
17 | FFTSRC=
18 | endif
19 | endif
20 |
21 | libspeexdsp_la_SOURCES = preprocess.c jitter.c mdf.c fftwrap.c filterbank.c resample.c buffer.c scal.c $(FFTSRC)
22 |
23 | noinst_HEADERS = arch.h bfin.h \
24 | fixed_arm4.h \
25 | fixed_arm5e.h fixed_bfin.h fixed_debug.h \
26 | math_approx.h misc_bfin.h \
27 | stack_alloc.h fftwrap.h \
28 | filterbank.h fixed_generic.h os_support.h \
29 | pseudofloat.h smallft.h vorbis_psy.h resample_sse.h resample_neon.h
30 |
31 | libspeexdsp_la_LDFLAGS = -no-undefined -version-info @SPEEXDSP_LT_CURRENT@:@SPEEXDSP_LT_REVISION@:@SPEEXDSP_LT_AGE@
32 | libspeexdsp_la_LIBADD = $(LIBM)
33 |
34 | if BUILD_EXAMPLES
35 | noinst_PROGRAMS = testdenoise testecho testjitter testresample
36 | testdenoise_SOURCES = testdenoise.c
37 | testdenoise_LDADD = libspeexdsp.la @FFT_LIBS@
38 | testecho_SOURCES = testecho.c
39 | testecho_LDADD = libspeexdsp.la @FFT_LIBS@
40 | testjitter_SOURCES = testjitter.c
41 | testjitter_LDADD = libspeexdsp.la @FFT_LIBS@
42 | testresample_SOURCES = testresample.c
43 | testresample_LDADD = libspeexdsp.la @FFT_LIBS@ @LIBM@
44 | endif
45 |
--------------------------------------------------------------------------------
/app/src/main/jni/libspeexdsp/smallft.h:
--------------------------------------------------------------------------------
1 | /********************************************************************
2 | * *
3 | * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
7 | * *
8 | * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 *
9 | * by the XIPHOPHORUS Company http://www.xiph.org/ *
10 | * *
11 | ********************************************************************
12 |
13 | function: fft transform
14 | last mod: $Id: smallft.h,v 1.3 2003/09/16 18:35:45 jm Exp $
15 |
16 | ********************************************************************/
17 | /**
18 | @file smallft.h
19 | @brief Discrete Rotational Fourier Transform (DRFT)
20 | */
21 |
22 | #ifndef _V_SMFT_H_
23 | #define _V_SMFT_H_
24 |
25 |
26 | #ifdef __cplusplus
27 | extern "C" {
28 | #endif
29 |
30 | /** Discrete Rotational Fourier Transform lookup */
31 | struct drft_lookup{
32 | int n;
33 | float *trigcache;
34 | int *splitcache;
35 | };
36 |
37 | extern void spx_drft_forward(struct drft_lookup *l,float *data);
38 | extern void spx_drft_backward(struct drft_lookup *l,float *data);
39 | extern void spx_drft_init(struct drft_lookup *l,int n);
40 | extern void spx_drft_clear(struct drft_lookup *l);
41 |
42 | #ifdef __cplusplus
43 | }
44 | #endif
45 |
46 | #endif
47 |
--------------------------------------------------------------------------------
/app/src/main/java/com/cyril/speexnoisecancel/UPlayer.java:
--------------------------------------------------------------------------------
1 | package com.cyril.speexnoisecancel;
2 |
3 | /**
4 | * Created by xuan on 2017/8/17.
5 | */
6 | import android.media.MediaPlayer;
7 | import android.text.TextUtils;
8 | import android.util.Log;
9 |
10 | import java.io.File;
11 | public class UPlayer{
12 |
13 | private final String TAG = UPlayer.class.getName();
14 | private String path;
15 |
16 | private MediaPlayer mPlayer;
17 | public UPlayer(String path){
18 | this.path = path;
19 | }
20 |
21 |
22 | public boolean isAudioExist(){
23 | if (!TextUtils.isEmpty(path)){
24 | File file = new File(path);
25 | return file.exists();
26 | }
27 | return false;
28 | }
29 |
30 | public boolean start() {
31 | try {
32 | if(mPlayer == null) {
33 | mPlayer = new MediaPlayer();
34 | mPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
35 | @Override
36 | public void onCompletion(MediaPlayer mp) {
37 | Log.d("UPlayer","onCompletion");
38 | stop();
39 | }
40 | });
41 | }
42 | //设置要播放的文件
43 | mPlayer.setDataSource(path);
44 | mPlayer.prepare();
45 | //播放
46 | mPlayer.start();
47 | }catch(Exception e){
48 | Log.e(TAG, "prepare() failed");
49 | }
50 |
51 | return false;
52 | }
53 |
54 |
55 | public boolean stop() {
56 | if(mPlayer != null) {
57 | mPlayer.stop();
58 | mPlayer.release();
59 | mPlayer = null;
60 | }
61 | return false;
62 | }
63 |
64 | }
--------------------------------------------------------------------------------
/app/src/main/jni/libspeexdsp/testdenoise.c:
--------------------------------------------------------------------------------
1 | #ifdef HAVE_CONFIG_H
2 | #include "config.h"
3 | #endif
4 |
5 | #include "speex/speex_preprocess.h"
6 | #include
7 |
8 | #define NN 1024
9 |
10 |
11 | jint Java_com_newband_myspeexdemo_Speex_CancelNoise(JNIEnv* env,jobject this,jstring input_file,jstring output_file)
12 | {
13 | const char* inputfile_path = (*env)->GetStringUTFChars(env,input_file, 0);
14 | const char* outputfile_path = (*env)->GetStringUTFChars(env,output_file, 0);
15 |
16 | FILE *inFile = fopen(inputfile_path, "rb");
17 | FILE *outFile = fopen(outputfile_path, "wb");
18 |
19 |
20 | short in[NN];
21 | int i;
22 | SpeexPreprocessState *st;
23 | int count=0;
24 | float f;
25 |
26 | st = speex_preprocess_state_init(NN, 44100);
27 | i=1;
28 | speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DENOISE, &i);
29 | i=0;
30 | speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_AGC, &i);
31 | i=8000;
32 | speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_AGC_LEVEL, &i);
33 | i=0;
34 | speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB, &i);
35 | f=.0;
36 | speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB_DECAY, &f);
37 | f=.0;
38 | speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB_LEVEL, &f);
39 | while (1)
40 | {
41 | int vad;
42 | fread(in, sizeof(short), NN, inFile);
43 | if (feof(stdin))
44 | break;
45 | vad = speex_preprocess_run(st, in);
46 | /*fprintf (stderr, "%d\n", vad);*/
47 | fwrite(in, sizeof(short), NN, outFile);
48 | count++;
49 | }
50 |
51 | fclose(inFile);
52 | fclose(outFile);
53 |
54 | speex_preprocess_state_destroy(st);
55 |
56 | (*env)->ReleaseStringUTFChars(env,input_file, inputfile_path);
57 | (*env)->ReleaseStringUTFChars(env,output_file, outputfile_path);
58 |
59 | return 0;
60 | }
61 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/smallft.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/x86/objs/speexdsp/./libspeexdsp/smallft.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/smallft.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/smallft.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h
9 |
10 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/smallft.h:
11 |
12 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
13 |
14 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
15 |
16 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
17 |
18 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
19 |
20 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
21 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/smallft.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/armeabi/objs/speexdsp/./libspeexdsp/smallft.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/smallft.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/smallft.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h
9 |
10 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/smallft.h:
11 |
12 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
13 |
14 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
15 |
16 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
17 |
18 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
19 |
20 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
21 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/buffer.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/x86/objs/speexdsp/./libspeexdsp/buffer.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/buffer.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_buffer.h
9 |
10 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
11 |
12 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
13 |
14 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
15 |
16 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
17 |
18 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
19 |
20 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_buffer.h:
21 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/jitter.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/x86/objs/speexdsp/./libspeexdsp/jitter.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/jitter.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_jitter.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h
9 |
10 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
11 |
12 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
13 |
14 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
15 |
16 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
17 |
18 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_jitter.h:
19 |
20 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
21 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/smallft.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/./libspeexdsp/smallft.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/smallft.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/smallft.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h
9 |
10 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/smallft.h:
11 |
12 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
13 |
14 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
15 |
16 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
17 |
18 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
19 |
20 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
21 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/buffer.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/armeabi/objs/speexdsp/./libspeexdsp/buffer.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/buffer.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_buffer.h
9 |
10 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
11 |
12 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
13 |
14 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
15 |
16 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
17 |
18 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
19 |
20 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_buffer.h:
21 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/jitter.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/armeabi/objs/speexdsp/./libspeexdsp/jitter.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/jitter.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_jitter.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h
9 |
10 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
11 |
12 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
13 |
14 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
15 |
16 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
17 |
18 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_jitter.h:
19 |
20 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
21 |
--------------------------------------------------------------------------------
/.idea/codeStyles/Project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/buffer.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/./libspeexdsp/buffer.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/buffer.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_buffer.h
9 |
10 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
11 |
12 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
13 |
14 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
15 |
16 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
17 |
18 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
19 |
20 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_buffer.h:
21 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/jitter.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/./libspeexdsp/jitter.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/jitter.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_jitter.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h
9 |
10 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
11 |
12 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
13 |
14 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
15 |
16 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
17 |
18 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_jitter.h:
19 |
20 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
21 |
--------------------------------------------------------------------------------
/app/src/main/jni/speex_process.c:
--------------------------------------------------------------------------------
1 | #ifdef HAVE_CONFIG_H
2 | #include "config.h"
3 | #endif
4 |
5 | #include
6 | #include
7 | #include
8 | #include "speex/speex_preprocess.h"
9 | #include
10 |
11 | #include
12 |
13 | #define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, "speex", __VA_ARGS__))
14 | #define LOGW(...) ((void)__android_log_print(ANDROID_LOG_WARN, "speex", __VA_ARGS__))
15 |
16 |
17 | SpeexPreprocessState *st;
18 |
19 | jint Java_com_cyril_speexnoisecancel_Speex_CancelNoiseInit(JNIEnv* env,jobject this,jint frame_size, jint sample_rate)
20 | {
21 |
22 | int i;
23 | int count=0;
24 | float f;
25 |
26 | st = speex_preprocess_state_init(frame_size/2, sample_rate);
27 | i=1;
28 | speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DENOISE, &i);
29 | i=0;
30 | speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_AGC, &i);
31 | i=8000;
32 | speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_AGC_LEVEL, &i);
33 | i=0;
34 | speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB, &i);
35 | f=.0;
36 | speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB_DECAY, &f);
37 | f=.0;
38 | speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB_LEVEL, &f);
39 |
40 | return 1;
41 | }
42 |
43 | jint Java_com_cyril_speexnoisecancel_Speex_CancelNoisePreprocess(JNIEnv* env,jobject this,jbyteArray buffer)
44 | {
45 |
46 | char * inbuffer = (*env)->GetByteArrayElements(env,buffer, 0);
47 |
48 | short *in = inbuffer;
49 |
50 | int vad = speex_preprocess_run(st, in);
51 |
52 | (*env)->ReleaseByteArrayElements(env,buffer, (jbyte *)inbuffer, 0);
53 |
54 | return vad;
55 | }
56 |
57 | jint Java_com_cyril_speexnoisecancel_Speex_CancelNoiseDestroy(JNIEnv* env,jobject this)
58 | {
59 | if(st != NULL)
60 | speex_preprocess_state_destroy(st);
61 | st = NULL;
62 | return 1;
63 | }
64 |
65 |
--------------------------------------------------------------------------------
/app/src/main/jni/libspeexdsp/testjitter.c:
--------------------------------------------------------------------------------
1 | #ifdef HAVE_CONFIG_H
2 | #include "config.h"
3 | #endif
4 |
5 | #include "speex/speex_jitter.h"
6 | #include
7 |
8 | union jbpdata {
9 | unsigned int idx;
10 | unsigned char data[4];
11 | };
12 |
13 | void synthIn(JitterBufferPacket *in, int idx, int span) {
14 | union jbpdata d;
15 | d.idx = idx;
16 |
17 | in->data = d.data;
18 | in->len = sizeof(d);
19 | in->timestamp = idx * 10;
20 | in->span = span * 10;
21 | in->sequence = idx;
22 | in->user_data = 0;
23 | }
24 |
25 | void jitterFill(JitterBuffer *jb) {
26 | char buffer[65536];
27 | JitterBufferPacket in, out;
28 | int i;
29 |
30 | out.data = buffer;
31 |
32 | jitter_buffer_reset(jb);
33 |
34 | for(i=0;i<100;++i) {
35 | synthIn(&in, i, 1);
36 | jitter_buffer_put(jb, &in);
37 |
38 | out.len = 65536;
39 | if (jitter_buffer_get(jb, &out, 10, NULL) != JITTER_BUFFER_OK) {
40 | printf("Fill test failed iteration %d\n", i);
41 | }
42 | if (out.timestamp != i * 10) {
43 | printf("Fill test expected %d got %d\n", i*10, out.timestamp);
44 | }
45 | jitter_buffer_tick(jb);
46 | }
47 | }
48 |
49 | int main()
50 | {
51 | char buffer[65536];
52 | JitterBufferPacket in, out;
53 | int i;
54 |
55 | JitterBuffer *jb = jitter_buffer_init(10);
56 |
57 | out.data = buffer;
58 |
59 | /* Frozen sender case */
60 | jitterFill(jb);
61 | for(i=0;i<100;++i) {
62 | out.len = 65536;
63 | jitter_buffer_get(jb, &out, 10, NULL);
64 | jitter_buffer_tick(jb);
65 | }
66 | synthIn(&in, 100, 1);
67 | jitter_buffer_put(jb, &in);
68 | out.len = 65536;
69 | if (jitter_buffer_get(jb, &out, 10, NULL) != JITTER_BUFFER_OK) {
70 | printf("Failed frozen sender resynchronize\n");
71 | } else {
72 | printf("Frozen sender: Jitter %d\n", out.timestamp - 100*10);
73 | }
74 | return 0;
75 | }
76 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/fftwrap.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/x86/objs/speexdsp/./libspeexdsp/fftwrap.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fftwrap.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fftr.h \
9 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fft.h
10 |
11 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
12 |
13 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
14 |
15 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
16 |
17 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
18 |
19 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
20 |
21 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fftr.h:
22 |
23 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fft.h:
24 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/fftwrap.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/armeabi/objs/speexdsp/./libspeexdsp/fftwrap.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fftwrap.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fftr.h \
9 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fft.h
10 |
11 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
12 |
13 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
14 |
15 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
16 |
17 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
18 |
19 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
20 |
21 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fftr.h:
22 |
23 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fft.h:
24 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/fftwrap.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/./libspeexdsp/fftwrap.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fftwrap.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fftr.h \
9 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fft.h
10 |
11 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
12 |
13 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
14 |
15 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
16 |
17 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
18 |
19 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
20 |
21 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fftr.h:
22 |
23 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fft.h:
24 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/filterbank.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/x86/objs/speexdsp/./libspeexdsp/filterbank.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/filterbank.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/filterbank.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/math_approx.h \
9 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h
10 |
11 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/filterbank.h:
12 |
13 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
14 |
15 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
16 |
17 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
18 |
19 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
20 |
21 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/math_approx.h:
22 |
23 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
24 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/filterbank.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/armeabi/objs/speexdsp/./libspeexdsp/filterbank.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/filterbank.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/filterbank.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/math_approx.h \
9 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h
10 |
11 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/filterbank.h:
12 |
13 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
14 |
15 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
16 |
17 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
18 |
19 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
20 |
21 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/math_approx.h:
22 |
23 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
24 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/resample.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/x86/objs/speexdsp/./libspeexdsp/resample.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/resample.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_resampler.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h \
9 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/stack_alloc.h
10 |
11 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_resampler.h:
12 |
13 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
14 |
15 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
16 |
17 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
18 |
19 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
20 |
21 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
22 |
23 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/stack_alloc.h:
24 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/resample.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/armeabi/objs/speexdsp/./libspeexdsp/resample.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/resample.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_resampler.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h \
9 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/stack_alloc.h
10 |
11 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_resampler.h:
12 |
13 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
14 |
15 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
16 |
17 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
18 |
19 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
20 |
21 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
22 |
23 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/stack_alloc.h:
24 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/filterbank.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/./libspeexdsp/filterbank.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/filterbank.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/filterbank.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/math_approx.h \
9 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h
10 |
11 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/filterbank.h:
12 |
13 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
14 |
15 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
16 |
17 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
18 |
19 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
20 |
21 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/math_approx.h:
22 |
23 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
24 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/resample.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/./libspeexdsp/resample.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/resample.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_resampler.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h \
9 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/stack_alloc.h
10 |
11 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_resampler.h:
12 |
13 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
14 |
15 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
16 |
17 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
18 |
19 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
20 |
21 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
22 |
23 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/stack_alloc.h:
24 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/scal.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/x86/objs/speexdsp/./libspeexdsp/scal.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/scal.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_echo.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/vorbis_psy.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
9 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h \
10 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/smallft.h
11 |
12 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_echo.h:
13 |
14 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
15 |
16 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
17 |
18 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/vorbis_psy.h:
19 |
20 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
21 |
22 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
23 |
24 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
25 |
26 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/smallft.h:
27 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/scal.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/armeabi/objs/speexdsp/./libspeexdsp/scal.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/scal.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_echo.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/vorbis_psy.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
9 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h \
10 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/smallft.h
11 |
12 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_echo.h:
13 |
14 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
15 |
16 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
17 |
18 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/vorbis_psy.h:
19 |
20 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
21 |
22 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
23 |
24 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
25 |
26 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/smallft.h:
27 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/scal.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/./libspeexdsp/scal.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/scal.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_echo.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/vorbis_psy.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
9 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h \
10 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/smallft.h
11 |
12 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_echo.h:
13 |
14 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
15 |
16 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
17 |
18 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/vorbis_psy.h:
19 |
20 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
21 |
22 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
23 |
24 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
25 |
26 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/smallft.h:
27 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/content_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
17 |
27 |
28 |
38 |
39 |
49 |
50 |
51 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/kiss_fft.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/x86/objs/speexdsp/./libspeexdsp/kiss_fft.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fft.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/_kiss_fft_guts.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fft.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
9 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/math_approx.h \
10 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h
11 |
12 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/_kiss_fft_guts.h:
13 |
14 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fft.h:
15 |
16 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
17 |
18 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
19 |
20 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
21 |
22 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
23 |
24 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/math_approx.h:
25 |
26 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
27 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/kiss_fft.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/armeabi/objs/speexdsp/./libspeexdsp/kiss_fft.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fft.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/_kiss_fft_guts.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fft.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
9 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/math_approx.h \
10 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h
11 |
12 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/_kiss_fft_guts.h:
13 |
14 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fft.h:
15 |
16 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
17 |
18 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
19 |
20 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
21 |
22 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
23 |
24 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/math_approx.h:
25 |
26 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
27 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/kiss_fft.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/./libspeexdsp/kiss_fft.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fft.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/_kiss_fft_guts.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fft.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
9 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/math_approx.h \
10 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h
11 |
12 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/_kiss_fft_guts.h:
13 |
14 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fft.h:
15 |
16 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
17 |
18 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
19 |
20 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
21 |
22 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
23 |
24 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/math_approx.h:
25 |
26 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
27 |
--------------------------------------------------------------------------------
/app/src/main/jni/libspeexdsp/echo_diagnostic.m:
--------------------------------------------------------------------------------
1 | % Attempts to diagnose AEC problems from recorded samples
2 | %
3 | % out = echo_diagnostic(rec_file, play_file, out_file, tail_length)
4 | %
5 | % Computes the full matrix inversion to cancel echo from the
6 | % recording 'rec_file' using the far end signal 'play_file' using
7 | % a filter length of 'tail_length'. The output is saved to 'out_file'.
8 | function out = echo_diagnostic(rec_file, play_file, out_file, tail_length)
9 |
10 | F=fopen(rec_file,'rb');
11 | rec=fread(F,Inf,'short');
12 | fclose (F);
13 | F=fopen(play_file,'rb');
14 | play=fread(F,Inf,'short');
15 | fclose (F);
16 |
17 | rec = [rec; zeros(1024,1)];
18 | play = [play; zeros(1024,1)];
19 |
20 | N = length(rec);
21 | corr = real(ifft(fft(rec).*conj(fft(play))));
22 | acorr = real(ifft(fft(play).*conj(fft(play))));
23 |
24 | [a,b] = max(corr);
25 |
26 | if b > N/2
27 | b = b-N;
28 | end
29 | printf ("Far end to near end delay is %d samples\n", b);
30 | if (b > .3*tail_length)
31 | printf ('This is too much delay, try delaying the far-end signal a bit\n');
32 | else if (b < 0)
33 | printf ('You have a negative delay, the echo canceller has no chance to cancel anything!\n');
34 | else
35 | printf ('Delay looks OK.\n');
36 | end
37 | end
38 | end
39 | N2 = round(N/2);
40 | corr1 = real(ifft(fft(rec(1:N2)).*conj(fft(play(1:N2)))));
41 | corr2 = real(ifft(fft(rec(N2+1:end)).*conj(fft(play(N2+1:end)))));
42 |
43 | [a,b1] = max(corr1);
44 | if b1 > N2/2
45 | b1 = b1-N2;
46 | end
47 | [a,b2] = max(corr2);
48 | if b2 > N2/2
49 | b2 = b2-N2;
50 | end
51 | drift = (b1-b2)/N2;
52 | printf ('Drift estimate is %f%% (%d samples)\n', 100*drift, b1-b2);
53 | if abs(b1-b2) < 10
54 | printf ('A drift of a few (+-10) samples is normal.\n');
55 | else
56 | if abs(b1-b2) < 30
57 | printf ('There may be (not sure) excessive clock drift. Is the capture and playback done on the same soundcard?\n');
58 | else
59 | printf ('Your clock is drifting! No way the AEC will be able to do anything with that. Most likely, you''re doing capture and playback from two different cards.\n');
60 | end
61 | end
62 | end
63 | acorr(1) = .001+1.00001*acorr(1);
64 | AtA = toeplitz(acorr(1:tail_length));
65 | bb = corr(1:tail_length);
66 | h = AtA\bb;
67 |
68 | out = (rec - filter(h, 1, play));
69 |
70 | F=fopen(out_file,'w');
71 | fwrite(F,out,'short');
72 | fclose (F);
73 |
--------------------------------------------------------------------------------
/app/src/main/jni/libspeexdsp/misc_bfin.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2005 Analog Devices */
2 | /**
3 | @file misc_bfin.h
4 | @author Jean-Marc Valin
5 | @brief Various compatibility routines for Speex (Blackfin version)
6 | */
7 | /*
8 | Redistribution and use in source and binary forms, with or without
9 | modification, are permitted provided that the following conditions
10 | are met:
11 |
12 | - Redistributions of source code must retain the above copyright
13 | notice, this list of conditions and the following disclaimer.
14 |
15 | - Redistributions in binary form must reproduce the above copyright
16 | notice, this list of conditions and the following disclaimer in the
17 | documentation and/or other materials provided with the distribution.
18 |
19 | - Neither the name of the Xiph.org Foundation nor the names of its
20 | contributors may be used to endorse or promote products derived from
21 | this software without specific prior written permission.
22 |
23 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
27 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
28 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
29 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
30 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
31 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
32 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 | */
35 |
36 | #include "bfin.h"
37 |
38 | #define OVERRIDE_SPEEX_MOVE
39 | void *speex_move (void *dest, void *src, int n)
40 | {
41 | __asm__ __volatile__
42 | (
43 | "L0 = 0;\n\t"
44 | "I0 = %0;\n\t"
45 | "R0 = [I0++];\n\t"
46 | "LOOP move%= LC0 = %2;\n\t"
47 | "LOOP_BEGIN move%=;\n\t"
48 | "[%1++] = R0 || R0 = [I0++];\n\t"
49 | "LOOP_END move%=;\n\t"
50 | "[%1++] = R0;\n\t"
51 | : "=a" (src), "=a" (dest)
52 | : "a" ((n>>2)-1), "0" (src), "1" (dest)
53 | : "R0", "I0", "L0", "memory" BFIN_HWLOOP0_REGS
54 | );
55 | return dest;
56 | }
57 |
--------------------------------------------------------------------------------
/app/src/main/jni/include/speex/speex_buffer.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2007 Jean-Marc Valin
2 |
3 | File: speex_buffer.h
4 | This is a very simple ring buffer implementation. It is not thread-safe
5 | so you need to do your own locking.
6 |
7 | Redistribution and use in source and binary forms, with or without
8 | modification, are permitted provided that the following conditions are
9 | met:
10 |
11 | 1. Redistributions of source code must retain the above copyright notice,
12 | this list of conditions and the following disclaimer.
13 |
14 | 2. Redistributions in binary form must reproduce the above copyright
15 | notice, this list of conditions and the following disclaimer in the
16 | documentation and/or other materials provided with the distribution.
17 |
18 | 3. The name of the author may not be used to endorse or promote products
19 | derived from this software without specific prior written permission.
20 |
21 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 | DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
25 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 | POSSIBILITY OF SUCH DAMAGE.
32 | */
33 |
34 | #ifndef SPEEX_BUFFER_H
35 | #define SPEEX_BUFFER_H
36 |
37 | #include "speexdsp_types.h"
38 |
39 | #ifdef __cplusplus
40 | extern "C" {
41 | #endif
42 |
43 | struct SpeexBuffer_;
44 | typedef struct SpeexBuffer_ SpeexBuffer;
45 |
46 | SpeexBuffer *speex_buffer_init(int size);
47 |
48 | void speex_buffer_destroy(SpeexBuffer *st);
49 |
50 | int speex_buffer_write(SpeexBuffer *st, void *data, int len);
51 |
52 | int speex_buffer_writezeros(SpeexBuffer *st, int len);
53 |
54 | int speex_buffer_read(SpeexBuffer *st, void *data, int len);
55 |
56 | int speex_buffer_get_available(SpeexBuffer *st);
57 |
58 | int speex_buffer_resize(SpeexBuffer *st, int len);
59 |
60 | #ifdef __cplusplus
61 | }
62 | #endif
63 |
64 | #endif
65 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/app/src/main/jni/libspeexdsp/fftwrap.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2005 Jean-Marc Valin
2 | File: fftwrap.h
3 |
4 | Wrapper for various FFTs
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions
8 | are met:
9 |
10 | - Redistributions of source code must retain the above copyright
11 | notice, this list of conditions and the following disclaimer.
12 |
13 | - Redistributions in binary form must reproduce the above copyright
14 | notice, this list of conditions and the following disclaimer in the
15 | documentation and/or other materials provided with the distribution.
16 |
17 | - Neither the name of the Xiph.org Foundation nor the names of its
18 | contributors may be used to endorse or promote products derived from
19 | this software without specific prior written permission.
20 |
21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
25 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 |
33 | */
34 |
35 | #ifndef FFTWRAP_H
36 | #define FFTWRAP_H
37 |
38 | #include "arch.h"
39 |
40 | /** Compute tables for an FFT */
41 | void *spx_fft_init(int size);
42 |
43 | /** Destroy tables for an FFT */
44 | void spx_fft_destroy(void *table);
45 |
46 | /** Forward (real to half-complex) transform */
47 | void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out);
48 |
49 | /** Backward (half-complex to real) transform */
50 | void spx_ifft(void *table, spx_word16_t *in, spx_word16_t *out);
51 |
52 | /** Forward (real to half-complex) transform of float data */
53 | void spx_fft_float(void *table, float *in, float *out);
54 |
55 | /** Backward (half-complex to real) transform of float data */
56 | void spx_ifft_float(void *table, float *in, float *out);
57 |
58 | #endif
59 |
--------------------------------------------------------------------------------
/app/src/main/jni/libspeexdsp/filterbank.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2006 Jean-Marc Valin */
2 | /**
3 | @file filterbank.h
4 | @brief Converting between psd and filterbank
5 | */
6 | /*
7 | Redistribution and use in source and binary forms, with or without
8 | modification, are permitted provided that the following conditions are
9 | met:
10 |
11 | 1. Redistributions of source code must retain the above copyright notice,
12 | this list of conditions and the following disclaimer.
13 |
14 | 2. Redistributions in binary form must reproduce the above copyright
15 | notice, this list of conditions and the following disclaimer in the
16 | documentation and/or other materials provided with the distribution.
17 |
18 | 3. The name of the author may not be used to endorse or promote products
19 | derived from this software without specific prior written permission.
20 |
21 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 | DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
25 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 | POSSIBILITY OF SUCH DAMAGE.
32 | */
33 |
34 | #ifndef FILTERBANK_H
35 | #define FILTERBANK_H
36 |
37 | #include "arch.h"
38 |
39 | typedef struct {
40 | int *bank_left;
41 | int *bank_right;
42 | spx_word16_t *filter_left;
43 | spx_word16_t *filter_right;
44 | #ifndef FIXED_POINT
45 | float *scaling;
46 | #endif
47 | int nb_banks;
48 | int len;
49 | } FilterBank;
50 |
51 |
52 | FilterBank *filterbank_new(int banks, spx_word32_t sampling, int len, int type);
53 |
54 | void filterbank_destroy(FilterBank *bank);
55 |
56 | void filterbank_compute_bank32(FilterBank *bank, spx_word32_t *ps, spx_word32_t *mel);
57 |
58 | void filterbank_compute_psd16(FilterBank *bank, spx_word16_t *mel, spx_word16_t *psd);
59 |
60 | #ifndef FIXED_POINT
61 | void filterbank_compute_bank(FilterBank *bank, float *psd, float *mel);
62 | void filterbank_compute_psd(FilterBank *bank, float *mel, float *psd);
63 | #endif
64 |
65 |
66 | #endif
67 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/mdf.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/x86/objs/speexdsp/./libspeexdsp/mdf.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/mdf.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_echo.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fftwrap.h \
9 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/pseudofloat.h \
10 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h \
11 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/math_approx.h
12 |
13 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
14 |
15 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
16 |
17 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
18 |
19 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
20 |
21 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_echo.h:
22 |
23 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fftwrap.h:
24 |
25 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/pseudofloat.h:
26 |
27 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
28 |
29 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/math_approx.h:
30 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/mdf.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/armeabi/objs/speexdsp/./libspeexdsp/mdf.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/mdf.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_echo.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fftwrap.h \
9 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/pseudofloat.h \
10 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h \
11 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/math_approx.h
12 |
13 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
14 |
15 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
16 |
17 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
18 |
19 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
20 |
21 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_echo.h:
22 |
23 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fftwrap.h:
24 |
25 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/pseudofloat.h:
26 |
27 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
28 |
29 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/math_approx.h:
30 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/mdf.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/./libspeexdsp/mdf.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/mdf.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_echo.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fftwrap.h \
9 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/pseudofloat.h \
10 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h \
11 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/math_approx.h
12 |
13 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
14 |
15 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
16 |
17 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
18 |
19 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
20 |
21 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_echo.h:
22 |
23 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fftwrap.h:
24 |
25 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/pseudofloat.h:
26 |
27 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
28 |
29 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/math_approx.h:
30 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/kiss_fftr.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/x86/objs/speexdsp/./libspeexdsp/kiss_fftr.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fftr.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fftr.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fft.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
9 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
10 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/_kiss_fft_guts.h \
11 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/math_approx.h
12 |
13 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
14 |
15 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fftr.h:
16 |
17 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fft.h:
18 |
19 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
20 |
21 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
22 |
23 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
24 |
25 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
26 |
27 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/_kiss_fft_guts.h:
28 |
29 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/math_approx.h:
30 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/kiss_fftr.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/armeabi/objs/speexdsp/./libspeexdsp/kiss_fftr.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fftr.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fftr.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fft.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
9 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
10 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/_kiss_fft_guts.h \
11 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/math_approx.h
12 |
13 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
14 |
15 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fftr.h:
16 |
17 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fft.h:
18 |
19 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
20 |
21 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
22 |
23 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
24 |
25 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
26 |
27 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/_kiss_fft_guts.h:
28 |
29 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/math_approx.h:
30 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/kiss_fftr.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/./libspeexdsp/kiss_fftr.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fftr.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fftr.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fft.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
9 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
10 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/_kiss_fft_guts.h \
11 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/math_approx.h
12 |
13 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
14 |
15 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fftr.h:
16 |
17 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/kiss_fft.h:
18 |
19 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
20 |
21 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
22 |
23 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
24 |
25 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
26 |
27 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/_kiss_fft_guts.h:
28 |
29 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/math_approx.h:
30 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/x86/objs/speexdsp/libspeexdsp/preprocess.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/x86/objs/speexdsp/./libspeexdsp/preprocess.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/preprocess.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_preprocess.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_echo.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
9 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fftwrap.h \
10 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/filterbank.h \
11 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/math_approx.h \
12 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h
13 |
14 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_preprocess.h:
15 |
16 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
17 |
18 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
19 |
20 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_echo.h:
21 |
22 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
23 |
24 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
25 |
26 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fftwrap.h:
27 |
28 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/filterbank.h:
29 |
30 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/math_approx.h:
31 |
32 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
33 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi/objs/speexdsp/libspeexdsp/preprocess.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/armeabi/objs/speexdsp/./libspeexdsp/preprocess.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/preprocess.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_preprocess.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_echo.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
9 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fftwrap.h \
10 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/filterbank.h \
11 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/math_approx.h \
12 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h
13 |
14 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_preprocess.h:
15 |
16 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
17 |
18 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
19 |
20 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_echo.h:
21 |
22 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
23 |
24 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
25 |
26 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fftwrap.h:
27 |
28 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/filterbank.h:
29 |
30 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/math_approx.h:
31 |
32 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
33 |
--------------------------------------------------------------------------------
/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/libspeexdsp/preprocess.o.d:
--------------------------------------------------------------------------------
1 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/obj/local/armeabi-v7a/objs/speexdsp/./libspeexdsp/preprocess.o: \
2 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/preprocess.c \
3 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_preprocess.h \
4 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h \
5 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h \
6 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_echo.h \
7 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h \
8 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h \
9 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fftwrap.h \
10 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/filterbank.h \
11 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/math_approx.h \
12 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h
13 |
14 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_preprocess.h:
15 |
16 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_types.h:
17 |
18 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speexdsp_config_types.h:
19 |
20 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/include/speex/speex_echo.h:
21 |
22 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/arch.h:
23 |
24 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fixed_generic.h:
25 |
26 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/fftwrap.h:
27 |
28 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/filterbank.h:
29 |
30 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/math_approx.h:
31 |
32 | /Users/kevinliu/Documents/ASProjects/mine/speexdenoise/Android-SpeexDenoise/app/src/main/jni/./libspeexdsp/os_support.h:
33 |
--------------------------------------------------------------------------------
/app/src/main/jni/libspeexdsp/testresample.c:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2007 Jean-Marc Valin
2 |
3 | File: testresample.c
4 | Testing the resampling code
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions are
8 | met:
9 |
10 | 1. Redistributions of source code must retain the above copyright notice,
11 | this list of conditions and the following disclaimer.
12 |
13 | 2. Redistributions in binary form must reproduce the above copyright
14 | notice, this list of conditions and the following disclaimer in the
15 | documentation and/or other materials provided with the distribution.
16 |
17 | 3. The name of the author may not be used to endorse or promote products
18 | derived from this software without specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
24 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
28 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
29 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 | POSSIBILITY OF SUCH DAMAGE.
31 | */
32 |
33 | #ifdef HAVE_CONFIG_H
34 | #include "config.h"
35 | #endif
36 |
37 | #include "speex/speex_resampler.h"
38 | #include
39 | #include
40 | #include
41 |
42 | #define NN 256
43 |
44 | int main()
45 | {
46 | spx_uint32_t i;
47 | short *in;
48 | short *out;
49 | float *fin, *fout;
50 | int count = 0;
51 | SpeexResamplerState *st = speex_resampler_init(1, 8000, 12000, 10, NULL);
52 | speex_resampler_set_rate(st, 96000, 44100);
53 | speex_resampler_skip_zeros(st);
54 |
55 | in = malloc(NN*sizeof(short));
56 | out = malloc(2*NN*sizeof(short));
57 | fin = malloc(NN*sizeof(float));
58 | fout = malloc(2*NN*sizeof(float));
59 | while (1)
60 | {
61 | spx_uint32_t in_len;
62 | spx_uint32_t out_len;
63 | fread(in, sizeof(short), NN, stdin);
64 | if (feof(stdin))
65 | break;
66 | for (i=0;i>() {
33 | @Override
34 | public void showRationale(Context context, List data, RequestExecutor executor) {
35 | executor.execute();
36 | }
37 | })
38 | .onGranted(new Action() {
39 | @Override
40 | public void onAction(Object data) {
41 | if (iPermissionSuccess != null) {
42 | iPermissionSuccess.onSuccess();
43 | }
44 | }
45 |
46 | }).onDenied(new Action>() {
47 | @Override
48 | public void onAction(List data) {
49 | if (AndPermission.hasAlwaysDeniedPermission(context, permissions)) {
50 | // 打开权限设置页
51 | if (iPermissionAlwaysDenied != null){
52 | if (iPermissionAlwaysDenied.onAlwaysDeniedShowSetting()){
53 | AndPermission.permissionSetting(context).execute();
54 | return;
55 | }
56 | }
57 | }
58 |
59 | if (iPermissionFailed != null) {
60 | iPermissionFailed.onFailed();
61 | }
62 |
63 | }
64 | }).start();
65 | }
66 |
67 |
68 | /**
69 | * 获取权限,不处理拒绝后不再询问的状况
70 | * @param context
71 | * @param iPermissionSuccess
72 | * @param iPermissionFailed
73 | * @param permissions
74 | */
75 | public static void grantPermission(final Context context, final IPermissionSuccess iPermissionSuccess, final IPermissionFailed iPermissionFailed,final String... permissions) {
76 | grantPermission(context,iPermissionSuccess,iPermissionFailed,null,permissions);
77 | }
78 |
79 | /**
80 | * 获取权限,不处理拒绝的情况
81 | * @param context
82 | * @param iPermissionSuccess
83 | * @param permissions
84 | */
85 | public static void grantPermission(final Context context, final IPermissionSuccess iPermissionSuccess,final String... permissions) {
86 | grantPermission(context,iPermissionSuccess,null,null,permissions);
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/app/src/main/jni/libspeexdsp/kiss_fft.h:
--------------------------------------------------------------------------------
1 | #ifndef KISS_FFT_H
2 | #define KISS_FFT_H
3 |
4 | #include
5 | #include
6 | #include "arch.h"
7 |
8 | #ifdef __cplusplus
9 | extern "C" {
10 | #endif
11 |
12 | /*
13 | ATTENTION!
14 | If you would like a :
15 | -- a utility that will handle the caching of fft objects
16 | -- real-only (no imaginary time component ) FFT
17 | -- a multi-dimensional FFT
18 | -- a command-line utility to perform ffts
19 | -- a command-line utility to perform fast-convolution filtering
20 |
21 | Then see kfc.h kiss_fftr.h kiss_fftnd.h fftutil.c kiss_fastfir.c
22 | in the tools/ directory.
23 | */
24 |
25 | #ifdef USE_SIMD
26 | # include
27 | # define kiss_fft_scalar __m128
28 | #define KISS_FFT_MALLOC(nbytes) memalign(16,nbytes)
29 | #else
30 | #define KISS_FFT_MALLOC speex_alloc
31 | #endif
32 |
33 |
34 | #ifdef FIXED_POINT
35 | #include "arch.h"
36 | # define kiss_fft_scalar spx_int16_t
37 | #else
38 | # ifndef kiss_fft_scalar
39 | /* default is float */
40 | # define kiss_fft_scalar float
41 | # endif
42 | #endif
43 |
44 | typedef struct {
45 | kiss_fft_scalar r;
46 | kiss_fft_scalar i;
47 | }kiss_fft_cpx;
48 |
49 | typedef struct kiss_fft_state* kiss_fft_cfg;
50 |
51 | /*
52 | * kiss_fft_alloc
53 | *
54 | * Initialize a FFT (or IFFT) algorithm's cfg/state buffer.
55 | *
56 | * typical usage: kiss_fft_cfg mycfg=kiss_fft_alloc(1024,0,NULL,NULL);
57 | *
58 | * The return value from fft_alloc is a cfg buffer used internally
59 | * by the fft routine or NULL.
60 | *
61 | * If lenmem is NULL, then kiss_fft_alloc will allocate a cfg buffer using malloc.
62 | * The returned value should be free()d when done to avoid memory leaks.
63 | *
64 | * The state can be placed in a user supplied buffer 'mem':
65 | * If lenmem is not NULL and mem is not NULL and *lenmem is large enough,
66 | * then the function places the cfg in mem and the size used in *lenmem
67 | * and returns mem.
68 | *
69 | * If lenmem is not NULL and ( mem is NULL or *lenmem is not large enough),
70 | * then the function returns NULL and places the minimum cfg
71 | * buffer size in *lenmem.
72 | * */
73 |
74 | kiss_fft_cfg kiss_fft_alloc(int nfft,int inverse_fft,void * mem,size_t * lenmem);
75 |
76 | /*
77 | * kiss_fft(cfg,in_out_buf)
78 | *
79 | * Perform an FFT on a complex input buffer.
80 | * for a forward FFT,
81 | * fin should be f[0] , f[1] , ... ,f[nfft-1]
82 | * fout will be F[0] , F[1] , ... ,F[nfft-1]
83 | * Note that each element is complex and can be accessed like
84 | f[k].r and f[k].i
85 | * */
86 | void kiss_fft(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout);
87 |
88 | /*
89 | A more generic version of the above function. It reads its input from every Nth sample.
90 | * */
91 | void kiss_fft_stride(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout,int fin_stride);
92 |
93 | /* If kiss_fft_alloc allocated a buffer, it is one contiguous
94 | buffer and can be simply free()d when no longer needed*/
95 | #define kiss_fft_free speex_free
96 |
97 | /*
98 | Cleans up some memory that gets managed internally. Not necessary to call, but it might clean up
99 | your compiler output to call this before you exit.
100 | */
101 | void kiss_fft_cleanup(void);
102 |
103 |
104 | #ifdef __cplusplus
105 | }
106 | #endif
107 |
108 | #endif
109 |
--------------------------------------------------------------------------------
/app/src/main/jni/libspeexdsp/vorbis_psy.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2005 Jean-Marc Valin, CSIRO, Christopher Montgomery
2 | File: vorbis_psy.h
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions
6 | are met:
7 |
8 | - Redistributions of source code must retain the above copyright
9 | notice, this list of conditions and the following disclaimer.
10 |
11 | - Redistributions in binary form must reproduce the above copyright
12 | notice, this list of conditions and the following disclaimer in the
13 | documentation and/or other materials provided with the distribution.
14 |
15 | - Neither the name of the Xiph.org Foundation nor the names of its
16 | contributors may be used to endorse or promote products derived from
17 | this software without specific prior written permission.
18 |
19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
23 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | */
31 |
32 | #ifndef VORBIS_PSY_H
33 | #define VORBIS_PSY_H
34 |
35 | #ifdef VORBIS_PSYCHO
36 |
37 | #include "smallft.h"
38 | #define P_BANDS 17 /* 62Hz to 16kHz */
39 | #define NOISE_COMPAND_LEVELS 40
40 |
41 |
42 | #define todB(x) ((x)>1e-13?log((x)*(x))*4.34294480f:-30)
43 | #define fromdB(x) (exp((x)*.11512925f))
44 |
45 | /* The bark scale equations are approximations, since the original
46 | table was somewhat hand rolled. The below are chosen to have the
47 | best possible fit to the rolled tables, thus their somewhat odd
48 | appearance (these are more accurate and over a longer range than
49 | the oft-quoted bark equations found in the texts I have). The
50 | approximations are valid from 0 - 30kHz (nyquist) or so.
51 |
52 | all f in Hz, z in Bark */
53 |
54 | #define toBARK(n) (13.1f*atan(.00074f*(n))+2.24f*atan((n)*(n)*1.85e-8f)+1e-4f*(n))
55 | #define fromBARK(z) (102.f*(z)-2.f*pow(z,2.f)+.4f*pow(z,3.f)+pow(1.46f,z)-1.f)
56 |
57 | /* Frequency to octave. We arbitrarily declare 63.5 Hz to be octave
58 | 0.0 */
59 |
60 | #define toOC(n) (log(n)*1.442695f-5.965784f)
61 | #define fromOC(o) (exp(((o)+5.965784f)*.693147f))
62 |
63 |
64 | typedef struct {
65 |
66 | float noisewindowlo;
67 | float noisewindowhi;
68 | int noisewindowlomin;
69 | int noisewindowhimin;
70 | int noisewindowfixed;
71 | float noiseoff[P_BANDS];
72 | float noisecompand[NOISE_COMPAND_LEVELS];
73 |
74 | } VorbisPsyInfo;
75 |
76 |
77 |
78 | typedef struct {
79 | int n;
80 | int rate;
81 | struct drft_lookup lookup;
82 | VorbisPsyInfo *vi;
83 |
84 | float *window;
85 | float *noiseoffset;
86 | long *bark;
87 |
88 | } VorbisPsy;
89 |
90 |
91 | VorbisPsy *vorbis_psy_init(int rate, int size);
92 | void vorbis_psy_destroy(VorbisPsy *psy);
93 | void compute_curve(VorbisPsy *psy, float *audio, float *curve);
94 | void curve_to_lpc(VorbisPsy *psy, float *curve, float *awk1, float *awk2, int ord);
95 |
96 | #endif
97 | #endif
98 |
--------------------------------------------------------------------------------
/app/src/main/jni/libspeexdsp/stack_alloc.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2002 Jean-Marc Valin */
2 | /**
3 | @file stack_alloc.h
4 | @brief Temporary memory allocation on stack
5 | */
6 | /*
7 | Redistribution and use in source and binary forms, with or without
8 | modification, are permitted provided that the following conditions
9 | are met:
10 |
11 | - Redistributions of source code must retain the above copyright
12 | notice, this list of conditions and the following disclaimer.
13 |
14 | - Redistributions in binary form must reproduce the above copyright
15 | notice, this list of conditions and the following disclaimer in the
16 | documentation and/or other materials provided with the distribution.
17 |
18 | - Neither the name of the Xiph.org Foundation nor the names of its
19 | contributors may be used to endorse or promote products derived from
20 | this software without specific prior written permission.
21 |
22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
26 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
27 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
28 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
29 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
30 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
31 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 | */
34 |
35 | #ifndef STACK_ALLOC_H
36 | #define STACK_ALLOC_H
37 |
38 | #ifdef USE_ALLOCA
39 | # ifdef WIN32
40 | # include
41 | # else
42 | # ifdef HAVE_ALLOCA_H
43 | # include
44 | # else
45 | # include
46 | # endif
47 | # endif
48 | #endif
49 |
50 | /**
51 | * @def ALIGN(stack, size)
52 | *
53 | * Aligns the stack to a 'size' boundary
54 | *
55 | * @param stack Stack
56 | * @param size New size boundary
57 | */
58 |
59 | /**
60 | * @def PUSH(stack, size, type)
61 | *
62 | * Allocates 'size' elements of type 'type' on the stack
63 | *
64 | * @param stack Stack
65 | * @param size Number of elements
66 | * @param type Type of element
67 | */
68 |
69 | /**
70 | * @def VARDECL(var)
71 | *
72 | * Declare variable on stack
73 | *
74 | * @param var Variable to declare
75 | */
76 |
77 | /**
78 | * @def ALLOC(var, size, type)
79 | *
80 | * Allocate 'size' elements of 'type' on stack
81 | *
82 | * @param var Name of variable to allocate
83 | * @param size Number of elements
84 | * @param type Type of element
85 | */
86 |
87 | #ifdef ENABLE_VALGRIND
88 |
89 | #include
90 |
91 | #define ALIGN(stack, size) ((stack) += ((size) - (long)(stack)) & ((size) - 1))
92 |
93 | #define PUSH(stack, size, type) (VALGRIND_MAKE_NOACCESS(stack, 1000),ALIGN((stack),sizeof(type)),VALGRIND_MAKE_WRITABLE(stack, ((size)*sizeof(type))),(stack)+=((size)*sizeof(type)),(type*)((stack)-((size)*sizeof(type))))
94 |
95 | #else
96 |
97 | #define ALIGN(stack, size) ((stack) += ((size) - (long)(stack)) & ((size) - 1))
98 |
99 | #define PUSH(stack, size, type) (ALIGN((stack),sizeof(type)),(stack)+=((size)*sizeof(type)),(type*)((stack)-((size)*sizeof(type))))
100 |
101 | #endif
102 |
103 | #if defined(VAR_ARRAYS)
104 | #define VARDECL(var)
105 | #define ALLOC(var, size, type) type var[size]
106 | #elif defined(USE_ALLOCA)
107 | #define VARDECL(var) var
108 | #define ALLOC(var, size, type) var = alloca(sizeof(type)*(size))
109 | #else
110 | #define VARDECL(var) var
111 | #define ALLOC(var, size, type) var = PUSH(stack, size, type)
112 | #endif
113 |
114 |
115 | #endif
116 |
--------------------------------------------------------------------------------
/app/src/main/jni/include/speex/speexdsp_types.h:
--------------------------------------------------------------------------------
1 | /* speexdsp_types.h taken from libogg */
2 | /********************************************************************
3 | * *
4 | * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
5 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
6 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
7 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
8 | * *
9 | * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
10 | * by the Xiph.Org Foundation http://www.xiph.org/ *
11 | * *
12 | ********************************************************************
13 |
14 | function: #ifdef jail to whip a few platforms into the UNIX ideal.
15 | last mod: $Id: os_types.h 7524 2004-08-11 04:20:36Z conrad $
16 |
17 | ********************************************************************/
18 | /**
19 | @file speexdsp_types.h
20 | @brief Speex types
21 | */
22 | #ifndef _SPEEX_TYPES_H
23 | #define _SPEEX_TYPES_H
24 |
25 | #if defined(_WIN32)
26 |
27 | # if defined(__CYGWIN__)
28 | # include <_G_config.h>
29 | typedef _G_int32_t spx_int32_t;
30 | typedef _G_uint32_t spx_uint32_t;
31 | typedef _G_int16_t spx_int16_t;
32 | typedef _G_uint16_t spx_uint16_t;
33 | # elif defined(__MINGW32__)
34 | typedef short spx_int16_t;
35 | typedef unsigned short spx_uint16_t;
36 | typedef int spx_int32_t;
37 | typedef unsigned int spx_uint32_t;
38 | # elif defined(__MWERKS__)
39 | typedef int spx_int32_t;
40 | typedef unsigned int spx_uint32_t;
41 | typedef short spx_int16_t;
42 | typedef unsigned short spx_uint16_t;
43 | # else
44 | /* MSVC/Borland */
45 | typedef __int32 spx_int32_t;
46 | typedef unsigned __int32 spx_uint32_t;
47 | typedef __int16 spx_int16_t;
48 | typedef unsigned __int16 spx_uint16_t;
49 | # endif
50 |
51 | #elif defined(__MACOS__)
52 |
53 | # include
54 | typedef SInt16 spx_int16_t;
55 | typedef UInt16 spx_uint16_t;
56 | typedef SInt32 spx_int32_t;
57 | typedef UInt32 spx_uint32_t;
58 |
59 | #elif (defined(__APPLE__) && defined(__MACH__)) /* MacOS X Framework build */
60 |
61 | # include
62 | typedef int16_t spx_int16_t;
63 | typedef u_int16_t spx_uint16_t;
64 | typedef int32_t spx_int32_t;
65 | typedef u_int32_t spx_uint32_t;
66 |
67 | #elif defined(__BEOS__)
68 |
69 | /* Be */
70 | # include
71 | typedef int16_t spx_int16_t;
72 | typedef u_int16_t spx_uint16_t;
73 | typedef int32_t spx_int32_t;
74 | typedef u_int32_t spx_uint32_t;
75 |
76 | #elif defined (__EMX__)
77 |
78 | /* OS/2 GCC */
79 | typedef short spx_int16_t;
80 | typedef unsigned short spx_uint16_t;
81 | typedef int spx_int32_t;
82 | typedef unsigned int spx_uint32_t;
83 |
84 | #elif defined (DJGPP)
85 |
86 | /* DJGPP */
87 | typedef short spx_int16_t;
88 | typedef int spx_int32_t;
89 | typedef unsigned int spx_uint32_t;
90 |
91 | #elif defined(R5900)
92 |
93 | /* PS2 EE */
94 | typedef int spx_int32_t;
95 | typedef unsigned spx_uint32_t;
96 | typedef short spx_int16_t;
97 |
98 | #elif defined(__SYMBIAN32__)
99 |
100 | /* Symbian GCC */
101 | typedef signed short spx_int16_t;
102 | typedef unsigned short spx_uint16_t;
103 | typedef signed int spx_int32_t;
104 | typedef unsigned int spx_uint32_t;
105 |
106 | #elif defined(CONFIG_TI_C54X) || defined (CONFIG_TI_C55X)
107 |
108 | typedef short spx_int16_t;
109 | typedef unsigned short spx_uint16_t;
110 | typedef long spx_int32_t;
111 | typedef unsigned long spx_uint32_t;
112 |
113 | #elif defined(CONFIG_TI_C6X)
114 |
115 | typedef short spx_int16_t;
116 | typedef unsigned short spx_uint16_t;
117 | typedef int spx_int32_t;
118 | typedef unsigned int spx_uint32_t;
119 |
120 | #else
121 |
122 | #include "speexdsp_config_types.h"
123 |
124 | #endif
125 |
126 | #endif /* _SPEEX_TYPES_H */
127 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | <<<<<<< HEAD
4 |
5 |
6 | =======
7 |
8 |
9 | >>>>>>> 363492f23122e21ed94b8de89551d1d95b39d6d4
10 |
11 |
12 |
13 |
14 |
15 |
16 | <<<<<<< HEAD
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | =======
26 |
27 |
28 |
29 |
30 |
31 | >>>>>>> 363492f23122e21ed94b8de89551d1d95b39d6d4
32 |
33 |
34 |
35 |
36 |
37 | <<<<<<< HEAD
38 |
39 | =======
40 |
41 | >>>>>>> 363492f23122e21ed94b8de89551d1d95b39d6d4
42 |
43 |
44 |
45 |
46 | <<<<<<< HEAD
47 |
48 |
49 | =======
50 | >>>>>>> 363492f23122e21ed94b8de89551d1d95b39d6d4
51 |
52 |
53 |
54 |
55 | <<<<<<< HEAD
56 |
57 | =======
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | Android
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 | >>>>>>> 363492f23122e21ed94b8de89551d1d95b39d6d4
86 |
87 |
88 |
89 |
90 |
91 | <<<<<<< HEAD
92 | =======
93 |
94 | $USER_HOME$/.subversion
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 | >>>>>>> 363492f23122e21ed94b8de89551d1d95b39d6d4
112 |
--------------------------------------------------------------------------------
/app/src/main/jni/libspeexdsp/fixed_arm4.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2004 Jean-Marc Valin */
2 | /**
3 | @file fixed_arm4.h
4 | @brief ARM4 fixed-point operations
5 | */
6 | /*
7 | Redistribution and use in source and binary forms, with or without
8 | modification, are permitted provided that the following conditions
9 | are met:
10 |
11 | - Redistributions of source code must retain the above copyright
12 | notice, this list of conditions and the following disclaimer.
13 |
14 | - Redistributions in binary form must reproduce the above copyright
15 | notice, this list of conditions and the following disclaimer in the
16 | documentation and/or other materials provided with the distribution.
17 |
18 | - Neither the name of the Xiph.org Foundation nor the names of its
19 | contributors may be used to endorse or promote products derived from
20 | this software without specific prior written permission.
21 |
22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
26 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
27 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
28 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
29 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
30 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
31 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 | */
34 |
35 | #ifndef FIXED_ARM4_H
36 | #define FIXED_ARM4_H
37 |
38 | #undef MULT16_32_Q14
39 | static inline spx_word32_t MULT16_32_Q14(spx_word16_t x, spx_word32_t y) {
40 | int res;
41 | int dummy;
42 | asm (
43 | "smull %0,%1,%2,%3 \n\t"
44 | "mov %0, %0, lsr #14 \n\t"
45 | "add %0, %0, %1, lsl #18 \n\t"
46 | : "=&r"(res), "=&r" (dummy)
47 | : "r"(y),"r"((int)x));
48 | return(res);
49 | }
50 |
51 | #undef MULT16_32_Q15
52 | static inline spx_word32_t MULT16_32_Q15(spx_word16_t x, spx_word32_t y) {
53 | int res;
54 | int dummy;
55 | asm (
56 | "smull %0,%1,%2,%3 \n\t"
57 | "mov %0, %0, lsr #15 \n\t"
58 | "add %0, %0, %1, lsl #17 \n\t"
59 | : "=&r"(res), "=&r" (dummy)
60 | : "r"(y),"r"((int)x));
61 | return(res);
62 | }
63 |
64 | #undef DIV32_16
65 | static inline short DIV32_16(int a, int b)
66 | {
67 | int res=0;
68 | int dead1, dead2, dead3, dead4, dead5;
69 | __asm__ __volatile__ (
70 | "\teor %5, %0, %1\n"
71 | "\tmovs %4, %0\n"
72 | "\trsbmi %0, %0, #0 \n"
73 | "\tmovs %4, %1\n"
74 | "\trsbmi %1, %1, #0 \n"
75 | "\tmov %4, #1\n"
76 |
77 | "\tsubs %3, %0, %1, asl #14 \n"
78 | "\tmovpl %0, %3 \n"
79 | "\torrpl %2, %2, %4, asl #14 \n"
80 |
81 | "\tsubs %3, %0, %1, asl #13 \n"
82 | "\tmovpl %0, %3 \n"
83 | "\torrpl %2, %2, %4, asl #13 \n"
84 |
85 | "\tsubs %3, %0, %1, asl #12 \n"
86 | "\tmovpl %0, %3 \n"
87 | "\torrpl %2, %2, %4, asl #12 \n"
88 |
89 | "\tsubs %3, %0, %1, asl #11 \n"
90 | "\tmovpl %0, %3 \n"
91 | "\torrpl %2, %2, %4, asl #11 \n"
92 |
93 | "\tsubs %3, %0, %1, asl #10 \n"
94 | "\tmovpl %0, %3 \n"
95 | "\torrpl %2, %2, %4, asl #10 \n"
96 |
97 | "\tsubs %3, %0, %1, asl #9 \n"
98 | "\tmovpl %0, %3 \n"
99 | "\torrpl %2, %2, %4, asl #9 \n"
100 |
101 | "\tsubs %3, %0, %1, asl #8 \n"
102 | "\tmovpl %0, %3 \n"
103 | "\torrpl %2, %2, %4, asl #8 \n"
104 |
105 | "\tsubs %3, %0, %1, asl #7 \n"
106 | "\tmovpl %0, %3 \n"
107 | "\torrpl %2, %2, %4, asl #7 \n"
108 |
109 | "\tsubs %3, %0, %1, asl #6 \n"
110 | "\tmovpl %0, %3 \n"
111 | "\torrpl %2, %2, %4, asl #6 \n"
112 |
113 | "\tsubs %3, %0, %1, asl #5 \n"
114 | "\tmovpl %0, %3 \n"
115 | "\torrpl %2, %2, %4, asl #5 \n"
116 |
117 | "\tsubs %3, %0, %1, asl #4 \n"
118 | "\tmovpl %0, %3 \n"
119 | "\torrpl %2, %2, %4, asl #4 \n"
120 |
121 | "\tsubs %3, %0, %1, asl #3 \n"
122 | "\tmovpl %0, %3 \n"
123 | "\torrpl %2, %2, %4, asl #3 \n"
124 |
125 | "\tsubs %3, %0, %1, asl #2 \n"
126 | "\tmovpl %0, %3 \n"
127 | "\torrpl %2, %2, %4, asl #2 \n"
128 |
129 | "\tsubs %3, %0, %1, asl #1 \n"
130 | "\tmovpl %0, %3 \n"
131 | "\torrpl %2, %2, %4, asl #1 \n"
132 |
133 | "\tsubs %3, %0, %1 \n"
134 | "\tmovpl %0, %3 \n"
135 | "\torrpl %2, %2, %4 \n"
136 |
137 | "\tmovs %5, %5, lsr #31 \n"
138 | "\trsbne %2, %2, #0 \n"
139 | : "=r" (dead1), "=r" (dead2), "=r" (res),
140 | "=r" (dead3), "=r" (dead4), "=r" (dead5)
141 | : "0" (a), "1" (b), "2" (res)
142 | : "cc"
143 | );
144 | return res;
145 | }
146 |
147 |
148 | #endif
149 |
--------------------------------------------------------------------------------
/app/src/main/jni/libspeexdsp/resample_sse.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2007-2008 Jean-Marc Valin
2 | * Copyright (C) 2008 Thorvald Natvig
3 | */
4 | /**
5 | @file resample_sse.h
6 | @brief Resampler functions (SSE version)
7 | */
8 | /*
9 | Redistribution and use in source and binary forms, with or without
10 | modification, are permitted provided that the following conditions
11 | are met:
12 |
13 | - Redistributions of source code must retain the above copyright
14 | notice, this list of conditions and the following disclaimer.
15 |
16 | - Redistributions in binary form must reproduce the above copyright
17 | notice, this list of conditions and the following disclaimer in the
18 | documentation and/or other materials provided with the distribution.
19 |
20 | - Neither the name of the Xiph.org Foundation nor the names of its
21 | contributors may be used to endorse or promote products derived from
22 | this software without specific prior written permission.
23 |
24 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
28 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
30 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
31 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
32 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
33 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
34 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 | */
36 |
37 | #include
38 |
39 | #define OVERRIDE_INNER_PRODUCT_SINGLE
40 | static inline float inner_product_single(const float *a, const float *b, unsigned int len)
41 | {
42 | int i;
43 | float ret;
44 | __m128 sum = _mm_setzero_ps();
45 | for (i=0;i
76 | #define OVERRIDE_INNER_PRODUCT_DOUBLE
77 |
78 | static inline double inner_product_double(const float *a, const float *b, unsigned int len)
79 | {
80 | int i;
81 | double ret;
82 | __m128d sum = _mm_setzero_pd();
83 | __m128 t;
84 | for (i=0;idata = speex_alloc(size);
55 | st->size = size;
56 | st->read_ptr = 0;
57 | st->write_ptr = 0;
58 | st->available = 0;
59 | return st;
60 | }
61 |
62 | EXPORT void speex_buffer_destroy(SpeexBuffer *st)
63 | {
64 | speex_free(st->data);
65 | speex_free(st);
66 | }
67 |
68 | EXPORT int speex_buffer_write(SpeexBuffer *st, void *_data, int len)
69 | {
70 | int end;
71 | int end1;
72 | char *data = _data;
73 | if (len > st->size)
74 | {
75 | data += len-st->size;
76 | len = st->size;
77 | }
78 | end = st->write_ptr + len;
79 | end1 = end;
80 | if (end1 > st->size)
81 | end1 = st->size;
82 | SPEEX_COPY(st->data + st->write_ptr, data, end1 - st->write_ptr);
83 | if (end > st->size)
84 | {
85 | end -= st->size;
86 | SPEEX_COPY(st->data, data+end1 - st->write_ptr, end);
87 | }
88 | st->available += len;
89 | if (st->available > st->size)
90 | {
91 | st->available = st->size;
92 | st->read_ptr = st->write_ptr;
93 | }
94 | st->write_ptr += len;
95 | if (st->write_ptr > st->size)
96 | st->write_ptr -= st->size;
97 | return len;
98 | }
99 |
100 | EXPORT int speex_buffer_writezeros(SpeexBuffer *st, int len)
101 | {
102 | /* This is almost the same as for speex_buffer_write() but using
103 | SPEEX_MEMSET() instead of SPEEX_COPY(). Update accordingly. */
104 | int end;
105 | int end1;
106 | if (len > st->size)
107 | {
108 | len = st->size;
109 | }
110 | end = st->write_ptr + len;
111 | end1 = end;
112 | if (end1 > st->size)
113 | end1 = st->size;
114 | SPEEX_MEMSET(st->data + st->write_ptr, 0, end1 - st->write_ptr);
115 | if (end > st->size)
116 | {
117 | end -= st->size;
118 | SPEEX_MEMSET(st->data, 0, end);
119 | }
120 | st->available += len;
121 | if (st->available > st->size)
122 | {
123 | st->available = st->size;
124 | st->read_ptr = st->write_ptr;
125 | }
126 | st->write_ptr += len;
127 | if (st->write_ptr > st->size)
128 | st->write_ptr -= st->size;
129 | return len;
130 | }
131 |
132 | EXPORT int speex_buffer_read(SpeexBuffer *st, void *_data, int len)
133 | {
134 | int end, end1;
135 | char *data = _data;
136 | if (len > st->available)
137 | {
138 | SPEEX_MEMSET(data+st->available, 0, st->size-st->available);
139 | len = st->available;
140 | }
141 | end = st->read_ptr + len;
142 | end1 = end;
143 | if (end1 > st->size)
144 | end1 = st->size;
145 | SPEEX_COPY(data, st->data + st->read_ptr, end1 - st->read_ptr);
146 |
147 | if (end > st->size)
148 | {
149 | end -= st->size;
150 | SPEEX_COPY(data+end1 - st->read_ptr, st->data, end);
151 | }
152 | st->available -= len;
153 | st->read_ptr += len;
154 | if (st->read_ptr > st->size)
155 | st->read_ptr -= st->size;
156 | return len;
157 | }
158 |
159 | EXPORT int speex_buffer_get_available(SpeexBuffer *st)
160 | {
161 | return st->available;
162 | }
163 |
164 | EXPORT int speex_buffer_resize(SpeexBuffer *st, int len)
165 | {
166 | int old_len = st->size;
167 | if (len > old_len)
168 | {
169 | st->data = speex_realloc(st->data, len);
170 | /* FIXME: move data/pointers properly for growing the buffer */
171 | } else {
172 | /* FIXME: move data/pointers properly for shrinking the buffer */
173 | st->data = speex_realloc(st->data, len);
174 | }
175 | return len;
176 | }
177 |
--------------------------------------------------------------------------------
/app/src/main/jni/libspeexdsp/fixed_bfin.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2005 Analog Devices
2 | Author: Jean-Marc Valin */
3 | /**
4 | @file fixed_bfin.h
5 | @brief Blackfin fixed-point operations
6 | */
7 | /*
8 | Redistribution and use in source and binary forms, with or without
9 | modification, are permitted provided that the following conditions
10 | are met:
11 |
12 | - Redistributions of source code must retain the above copyright
13 | notice, this list of conditions and the following disclaimer.
14 |
15 | - Redistributions in binary form must reproduce the above copyright
16 | notice, this list of conditions and the following disclaimer in the
17 | documentation and/or other materials provided with the distribution.
18 |
19 | - Neither the name of the Xiph.org Foundation nor the names of its
20 | contributors may be used to endorse or promote products derived from
21 | this software without specific prior written permission.
22 |
23 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
27 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
28 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
29 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
30 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
31 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
32 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 | */
35 |
36 | #ifndef FIXED_BFIN_H
37 | #define FIXED_BFIN_H
38 |
39 | #include "bfin.h"
40 |
41 | #undef PDIV32_16
42 | static inline spx_word16_t PDIV32_16(spx_word32_t a, spx_word16_t b)
43 | {
44 | spx_word32_t res, bb;
45 | bb = b;
46 | a += b>>1;
47 | __asm__ (
48 | "P0 = 15;\n\t"
49 | "R0 = %1;\n\t"
50 | "R1 = %2;\n\t"
51 | //"R0 = R0 + R1;\n\t"
52 | "R0 <<= 1;\n\t"
53 | "DIVS (R0, R1);\n\t"
54 | "LOOP divide%= LC0 = P0;\n\t"
55 | "LOOP_BEGIN divide%=;\n\t"
56 | "DIVQ (R0, R1);\n\t"
57 | "LOOP_END divide%=;\n\t"
58 | "R0 = R0.L;\n\t"
59 | "%0 = R0;\n\t"
60 | : "=m" (res)
61 | : "m" (a), "m" (bb)
62 | : "P0", "R0", "R1", "ASTAT" BFIN_HWLOOP0_REGS);
63 | return res;
64 | }
65 |
66 | #undef DIV32_16
67 | static inline spx_word16_t DIV32_16(spx_word32_t a, spx_word16_t b)
68 | {
69 | spx_word32_t res, bb;
70 | bb = b;
71 | /* Make the roundinf consistent with the C version
72 | (do we need to do that?)*/
73 | if (a<0)
74 | a += (b-1);
75 | __asm__ (
76 | "P0 = 15;\n\t"
77 | "R0 = %1;\n\t"
78 | "R1 = %2;\n\t"
79 | "R0 <<= 1;\n\t"
80 | "DIVS (R0, R1);\n\t"
81 | "LOOP divide%= LC0 = P0;\n\t"
82 | "LOOP_BEGIN divide%=;\n\t"
83 | "DIVQ (R0, R1);\n\t"
84 | "LOOP_END divide%=;\n\t"
85 | "R0 = R0.L;\n\t"
86 | "%0 = R0;\n\t"
87 | : "=m" (res)
88 | : "m" (a), "m" (bb)
89 | : "P0", "R0", "R1", "ASTAT" BFIN_HWLOOP0_REGS);
90 | return res;
91 | }
92 |
93 | #undef MAX16
94 | static inline spx_word16_t MAX16(spx_word16_t a, spx_word16_t b)
95 | {
96 | spx_word32_t res;
97 | __asm__ (
98 | "%1 = %1.L (X);\n\t"
99 | "%2 = %2.L (X);\n\t"
100 | "%0 = MAX(%1,%2);"
101 | : "=d" (res)
102 | : "%d" (a), "d" (b)
103 | : "ASTAT"
104 | );
105 | return res;
106 | }
107 |
108 | #undef MULT16_32_Q15
109 | static inline spx_word32_t MULT16_32_Q15(spx_word16_t a, spx_word32_t b)
110 | {
111 | spx_word32_t res;
112 | __asm__
113 | (
114 | "A1 = %2.L*%1.L (M);\n\t"
115 | "A1 = A1 >>> 15;\n\t"
116 | "%0 = (A1 += %2.L*%1.H) ;\n\t"
117 | : "=&W" (res), "=&d" (b)
118 | : "d" (a), "1" (b)
119 | : "A1", "ASTAT"
120 | );
121 | return res;
122 | }
123 |
124 | #undef MAC16_32_Q15
125 | static inline spx_word32_t MAC16_32_Q15(spx_word32_t c, spx_word16_t a, spx_word32_t b)
126 | {
127 | spx_word32_t res;
128 | __asm__
129 | (
130 | "A1 = %2.L*%1.L (M);\n\t"
131 | "A1 = A1 >>> 15;\n\t"
132 | "%0 = (A1 += %2.L*%1.H);\n\t"
133 | "%0 = %0 + %4;\n\t"
134 | : "=&W" (res), "=&d" (b)
135 | : "d" (a), "1" (b), "d" (c)
136 | : "A1", "ASTAT"
137 | );
138 | return res;
139 | }
140 |
141 | #undef MULT16_32_Q14
142 | static inline spx_word32_t MULT16_32_Q14(spx_word16_t a, spx_word32_t b)
143 | {
144 | spx_word32_t res;
145 | __asm__
146 | (
147 | "%2 <<= 1;\n\t"
148 | "A1 = %1.L*%2.L (M);\n\t"
149 | "A1 = A1 >>> 15;\n\t"
150 | "%0 = (A1 += %1.L*%2.H);\n\t"
151 | : "=W" (res), "=d" (a), "=d" (b)
152 | : "1" (a), "2" (b)
153 | : "A1", "ASTAT"
154 | );
155 | return res;
156 | }
157 |
158 | #undef MAC16_32_Q14
159 | static inline spx_word32_t MAC16_32_Q14(spx_word32_t c, spx_word16_t a, spx_word32_t b)
160 | {
161 | spx_word32_t res;
162 | __asm__
163 | (
164 | "%1 <<= 1;\n\t"
165 | "A1 = %2.L*%1.L (M);\n\t"
166 | "A1 = A1 >>> 15;\n\t"
167 | "%0 = (A1 += %2.L*%1.H);\n\t"
168 | "%0 = %0 + %4;\n\t"
169 | : "=&W" (res), "=&d" (b)
170 | : "d" (a), "1" (b), "d" (c)
171 | : "A1", "ASTAT"
172 | );
173 | return res;
174 | }
175 |
176 | #endif
177 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/app/src/main/jni/libspeexdsp/fixed_generic.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2003 Jean-Marc Valin */
2 | /**
3 | @file fixed_generic.h
4 | @brief Generic fixed-point operations
5 | */
6 | /*
7 | Redistribution and use in source and binary forms, with or without
8 | modification, are permitted provided that the following conditions
9 | are met:
10 |
11 | - Redistributions of source code must retain the above copyright
12 | notice, this list of conditions and the following disclaimer.
13 |
14 | - Redistributions in binary form must reproduce the above copyright
15 | notice, this list of conditions and the following disclaimer in the
16 | documentation and/or other materials provided with the distribution.
17 |
18 | - Neither the name of the Xiph.org Foundation nor the names of its
19 | contributors may be used to endorse or promote products derived from
20 | this software without specific prior written permission.
21 |
22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
26 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
27 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
28 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
29 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
30 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
31 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 | */
34 |
35 | #ifndef FIXED_GENERIC_H
36 | #define FIXED_GENERIC_H
37 |
38 | #define QCONST16(x,bits) ((spx_word16_t)(.5+(x)*(((spx_word32_t)1)<<(bits))))
39 | #define QCONST32(x,bits) ((spx_word32_t)(.5+(x)*(((spx_word32_t)1)<<(bits))))
40 |
41 | #define NEG16(x) (-(x))
42 | #define NEG32(x) (-(x))
43 | #define EXTRACT16(x) ((spx_word16_t)(x))
44 | #define EXTEND32(x) ((spx_word32_t)(x))
45 | #define SHR16(a,shift) ((a) >> (shift))
46 | #define SHL16(a,shift) ((a) << (shift))
47 | #define SHR32(a,shift) ((a) >> (shift))
48 | #define SHL32(a,shift) ((a) << (shift))
49 | #define PSHR16(a,shift) (SHR16((a)+((1<<((shift))>>1)),shift))
50 | #define PSHR32(a,shift) (SHR32((a)+((EXTEND32(1)<<((shift))>>1)),shift))
51 | #define VSHR32(a, shift) (((shift)>0) ? SHR32(a, shift) : SHL32(a, -(shift)))
52 | #define SATURATE16(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x)))
53 | #define SATURATE32(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x)))
54 |
55 | #define SATURATE32PSHR(x,shift,a) (((x)>=(SHL32(a,shift))) ? (a) : \
56 | (x)<=-(SHL32(a,shift)) ? -(a) : \
57 | (PSHR32(x, shift)))
58 |
59 | #define SHR(a,shift) ((a) >> (shift))
60 | #define SHL(a,shift) ((spx_word32_t)(a) << (shift))
61 | #define PSHR(a,shift) (SHR((a)+((EXTEND32(1)<<((shift))>>1)),shift))
62 | #define SATURATE(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x)))
63 |
64 |
65 | #define ADD16(a,b) ((spx_word16_t)((spx_word16_t)(a)+(spx_word16_t)(b)))
66 | #define SUB16(a,b) ((spx_word16_t)(a)-(spx_word16_t)(b))
67 | #define ADD32(a,b) ((spx_word32_t)(a)+(spx_word32_t)(b))
68 | #define SUB32(a,b) ((spx_word32_t)(a)-(spx_word32_t)(b))
69 |
70 |
71 | /* result fits in 16 bits */
72 | #define MULT16_16_16(a,b) ((((spx_word16_t)(a))*((spx_word16_t)(b))))
73 |
74 | /* (spx_word32_t)(spx_word16_t) gives TI compiler a hint that it's 16x16->32 multiply */
75 | #define MULT16_16(a,b) (((spx_word32_t)(spx_word16_t)(a))*((spx_word32_t)(spx_word16_t)(b)))
76 |
77 | #define MAC16_16(c,a,b) (ADD32((c),MULT16_16((a),(b))))
78 | #define MULT16_32_Q12(a,b) ADD32(MULT16_16((a),SHR((b),12)), SHR(MULT16_16((a),((b)&0x00000fff)),12))
79 | #define MULT16_32_Q13(a,b) ADD32(MULT16_16((a),SHR((b),13)), SHR(MULT16_16((a),((b)&0x00001fff)),13))
80 | #define MULT16_32_Q14(a,b) ADD32(MULT16_16((a),SHR((b),14)), SHR(MULT16_16((a),((b)&0x00003fff)),14))
81 |
82 | #define MULT16_32_Q11(a,b) ADD32(MULT16_16((a),SHR((b),11)), SHR(MULT16_16((a),((b)&0x000007ff)),11))
83 | #define MAC16_32_Q11(c,a,b) ADD32(c,ADD32(MULT16_16((a),SHR((b),11)), SHR(MULT16_16((a),((b)&0x000007ff)),11)))
84 |
85 | #define MULT16_32_P15(a,b) ADD32(MULT16_16((a),SHR((b),15)), PSHR(MULT16_16((a),((b)&0x00007fff)),15))
86 | #define MULT16_32_Q15(a,b) ADD32(MULT16_16((a),SHR((b),15)), SHR(MULT16_16((a),((b)&0x00007fff)),15))
87 | #define MAC16_32_Q15(c,a,b) ADD32(c,ADD32(MULT16_16((a),SHR((b),15)), SHR(MULT16_16((a),((b)&0x00007fff)),15)))
88 |
89 |
90 | #define MAC16_16_Q11(c,a,b) (ADD32((c),SHR(MULT16_16((a),(b)),11)))
91 | #define MAC16_16_Q13(c,a,b) (ADD32((c),SHR(MULT16_16((a),(b)),13)))
92 | #define MAC16_16_P13(c,a,b) (ADD32((c),SHR(ADD32(4096,MULT16_16((a),(b))),13)))
93 |
94 | #define MULT16_16_Q11_32(a,b) (SHR(MULT16_16((a),(b)),11))
95 | #define MULT16_16_Q13(a,b) (SHR(MULT16_16((a),(b)),13))
96 | #define MULT16_16_Q14(a,b) (SHR(MULT16_16((a),(b)),14))
97 | #define MULT16_16_Q15(a,b) (SHR(MULT16_16((a),(b)),15))
98 |
99 | #define MULT16_16_P13(a,b) (SHR(ADD32(4096,MULT16_16((a),(b))),13))
100 | #define MULT16_16_P14(a,b) (SHR(ADD32(8192,MULT16_16((a),(b))),14))
101 | #define MULT16_16_P15(a,b) (SHR(ADD32(16384,MULT16_16((a),(b))),15))
102 |
103 | #define MUL_16_32_R15(a,bh,bl) ADD32(MULT16_16((a),(bh)), SHR(MULT16_16((a),(bl)),15))
104 |
105 | #define DIV32_16(a,b) ((spx_word16_t)(((spx_word32_t)(a))/((spx_word16_t)(b))))
106 | #define PDIV32_16(a,b) ((spx_word16_t)(((spx_word32_t)(a)+((spx_word16_t)(b)>>1))/((spx_word16_t)(b))))
107 | #define DIV32(a,b) (((spx_word32_t)(a))/((spx_word32_t)(b)))
108 | #define PDIV32(a,b) (((spx_word32_t)(a)+((spx_word16_t)(b)>>1))/((spx_word32_t)(b)))
109 |
110 | #endif
111 |
--------------------------------------------------------------------------------
/app/src/main/jni/libspeexdsp/os_support.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2007 Jean-Marc Valin
2 |
3 | File: os_support.h
4 | This is the (tiny) OS abstraction layer. Aside from math.h, this is the
5 | only place where system headers are allowed.
6 |
7 | Redistribution and use in source and binary forms, with or without
8 | modification, are permitted provided that the following conditions are
9 | met:
10 |
11 | 1. Redistributions of source code must retain the above copyright notice,
12 | this list of conditions and the following disclaimer.
13 |
14 | 2. Redistributions in binary form must reproduce the above copyright
15 | notice, this list of conditions and the following disclaimer in the
16 | documentation and/or other materials provided with the distribution.
17 |
18 | 3. The name of the author may not be used to endorse or promote products
19 | derived from this software without specific prior written permission.
20 |
21 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 | DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
25 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 | POSSIBILITY OF SUCH DAMAGE.
32 | */
33 |
34 | #ifndef OS_SUPPORT_H
35 | #define OS_SUPPORT_H
36 |
37 | #include
38 | #include
39 | #include
40 |
41 | #ifdef HAVE_CONFIG_H
42 | #include "config.h"
43 | #endif
44 | #ifdef OS_SUPPORT_CUSTOM
45 | #include "os_support_custom.h"
46 | #endif
47 |
48 | /** Speex wrapper for calloc. To do your own dynamic allocation, all you need to do is replace this function, speex_realloc and speex_free
49 | NOTE: speex_alloc needs to CLEAR THE MEMORY */
50 | #ifndef OVERRIDE_SPEEX_ALLOC
51 | static inline void *speex_alloc (int size)
52 | {
53 | /* WARNING: this is not equivalent to malloc(). If you want to use malloc()
54 | or your own allocator, YOU NEED TO CLEAR THE MEMORY ALLOCATED. Otherwise
55 | you will experience strange bugs */
56 | return calloc(size,1);
57 | }
58 | #endif
59 |
60 | /** Same as speex_alloc, except that the area is only needed inside a Speex call (might cause problem with wideband though) */
61 | #ifndef OVERRIDE_SPEEX_ALLOC_SCRATCH
62 | static inline void *speex_alloc_scratch (int size)
63 | {
64 | /* Scratch space doesn't need to be cleared */
65 | return calloc(size,1);
66 | }
67 | #endif
68 |
69 | /** Speex wrapper for realloc. To do your own dynamic allocation, all you need to do is replace this function, speex_alloc and speex_free */
70 | #ifndef OVERRIDE_SPEEX_REALLOC
71 | static inline void *speex_realloc (void *ptr, int size)
72 | {
73 | return realloc(ptr, size);
74 | }
75 | #endif
76 |
77 | /** Speex wrapper for calloc. To do your own dynamic allocation, all you need to do is replace this function, speex_realloc and speex_alloc */
78 | #ifndef OVERRIDE_SPEEX_FREE
79 | static inline void speex_free (void *ptr)
80 | {
81 | free(ptr);
82 | }
83 | #endif
84 |
85 | /** Same as speex_free, except that the area is only needed inside a Speex call (might cause problem with wideband though) */
86 | #ifndef OVERRIDE_SPEEX_FREE_SCRATCH
87 | static inline void speex_free_scratch (void *ptr)
88 | {
89 | free(ptr);
90 | }
91 | #endif
92 |
93 | /** Copy n elements from src to dst. The 0* term provides compile-time type checking */
94 | #ifndef OVERRIDE_SPEEX_COPY
95 | #define SPEEX_COPY(dst, src, n) (memcpy((dst), (src), (n)*sizeof(*(dst)) + 0*((dst)-(src)) ))
96 | #endif
97 |
98 | /** Copy n elements from src to dst, allowing overlapping regions. The 0* term
99 | provides compile-time type checking */
100 | #ifndef OVERRIDE_SPEEX_MOVE
101 | #define SPEEX_MOVE(dst, src, n) (memmove((dst), (src), (n)*sizeof(*(dst)) + 0*((dst)-(src)) ))
102 | #endif
103 |
104 | /** For n elements worth of memory, set every byte to the value of c, starting at address dst */
105 | #ifndef OVERRIDE_SPEEX_MEMSET
106 | #define SPEEX_MEMSET(dst, c, n) (memset((dst), (c), (n)*sizeof(*(dst))))
107 | #endif
108 |
109 |
110 | #ifndef OVERRIDE_SPEEX_FATAL
111 | static inline void _speex_fatal(const char *str, const char *file, int line)
112 | {
113 | fprintf (stderr, "Fatal (internal) error in %s, line %d: %s\n", file, line, str);
114 | exit(1);
115 | }
116 | #endif
117 |
118 | #ifndef OVERRIDE_SPEEX_WARNING
119 | static inline void speex_warning(const char *str)
120 | {
121 | #ifndef DISABLE_WARNINGS
122 | fprintf (stderr, "warning: %s\n", str);
123 | #endif
124 | }
125 | #endif
126 |
127 | #ifndef OVERRIDE_SPEEX_WARNING_INT
128 | static inline void speex_warning_int(const char *str, int val)
129 | {
130 | #ifndef DISABLE_WARNINGS
131 | fprintf (stderr, "warning: %s %d\n", str, val);
132 | #endif
133 | }
134 | #endif
135 |
136 | #ifndef OVERRIDE_SPEEX_NOTIFY
137 | static inline void speex_notify(const char *str)
138 | {
139 | #ifndef DISABLE_NOTIFICATIONS
140 | fprintf (stderr, "notification: %s\n", str);
141 | #endif
142 | }
143 | #endif
144 |
145 | #ifndef OVERRIDE_SPEEX_PUTC
146 | /** Speex wrapper for putc */
147 | static inline void _speex_putc(int ch, void *file)
148 | {
149 | FILE *f = (FILE *)file;
150 | fprintf(f, "%c", ch);
151 | }
152 | #endif
153 |
154 | #define speex_fatal(str) _speex_fatal(str, __FILE__, __LINE__);
155 | #define speex_assert(cond) {if (!(cond)) {speex_fatal("assertion failed: " #cond);}}
156 |
157 | #ifndef RELEASE
158 | static inline void print_vec(float *vec, int len, char *name)
159 | {
160 | int i;
161 | printf ("%s ", name);
162 | for (i=0;i