Go to file
Uladzimir Karpenka 89c8a0e2b5 first commit
2026-06-01 15:58:45 +03:00
java/org/openhpsdr/dsp first commit 2026-06-01 15:58:45 +03:00
third_party first commit 2026-06-01 15:58:45 +03:00
.gitignore first commit 2026-06-01 15:58:45 +03:00
amd.c first commit 2026-06-01 15:58:45 +03:00
amd.h first commit 2026-06-01 15:58:45 +03:00
ammod.c first commit 2026-06-01 15:58:45 +03:00
ammod.h first commit 2026-06-01 15:58:45 +03:00
amsq.c first commit 2026-06-01 15:58:45 +03:00
amsq.h first commit 2026-06-01 15:58:45 +03:00
analyzer.c first commit 2026-06-01 15:58:45 +03:00
analyzer.h first commit 2026-06-01 15:58:45 +03:00
anf.c first commit 2026-06-01 15:58:45 +03:00
anf.h first commit 2026-06-01 15:58:45 +03:00
anr.c first commit 2026-06-01 15:58:45 +03:00
anr.h first commit 2026-06-01 15:58:45 +03:00
apfshadow.c first commit 2026-06-01 15:58:45 +03:00
apfshadow.h first commit 2026-06-01 15:58:45 +03:00
bandpass.c first commit 2026-06-01 15:58:45 +03:00
bandpass.h first commit 2026-06-01 15:58:45 +03:00
calcc.c first commit 2026-06-01 15:58:45 +03:00
calcc.h first commit 2026-06-01 15:58:45 +03:00
calculus first commit 2026-06-01 15:58:45 +03:00
calculus.c first commit 2026-06-01 15:58:45 +03:00
calculus.h first commit 2026-06-01 15:58:45 +03:00
cblock.c first commit 2026-06-01 15:58:45 +03:00
cblock.h first commit 2026-06-01 15:58:45 +03:00
cfcomp.c first commit 2026-06-01 15:58:45 +03:00
cfcomp.h first commit 2026-06-01 15:58:45 +03:00
cfir.c first commit 2026-06-01 15:58:45 +03:00
cfir.h first commit 2026-06-01 15:58:45 +03:00
channel.c first commit 2026-06-01 15:58:45 +03:00
channel.h first commit 2026-06-01 15:58:45 +03:00
cmath.c first commit 2026-06-01 15:58:45 +03:00
cmath.h first commit 2026-06-01 15:58:45 +03:00
comm.h first commit 2026-06-01 15:58:45 +03:00
compress.c first commit 2026-06-01 15:58:45 +03:00
compress.h first commit 2026-06-01 15:58:45 +03:00
COPYING first commit 2026-06-01 15:58:45 +03:00
delay.c first commit 2026-06-01 15:58:45 +03:00
delay.h first commit 2026-06-01 15:58:45 +03:00
dexp.c first commit 2026-06-01 15:58:45 +03:00
dexp.h first commit 2026-06-01 15:58:45 +03:00
div.c first commit 2026-06-01 15:58:45 +03:00
div.h first commit 2026-06-01 15:58:45 +03:00
doublepole.c first commit 2026-06-01 15:58:45 +03:00
doublepole.h first commit 2026-06-01 15:58:45 +03:00
eer.c first commit 2026-06-01 15:58:45 +03:00
eer.h first commit 2026-06-01 15:58:45 +03:00
emnr.c first commit 2026-06-01 15:58:45 +03:00
emnr.h first commit 2026-06-01 15:58:45 +03:00
emph.c first commit 2026-06-01 15:58:45 +03:00
emph.h first commit 2026-06-01 15:58:45 +03:00
eq.c first commit 2026-06-01 15:58:45 +03:00
eq.h first commit 2026-06-01 15:58:45 +03:00
fastmath.h first commit 2026-06-01 15:58:45 +03:00
fcurve.c first commit 2026-06-01 15:58:45 +03:00
fcurve.h first commit 2026-06-01 15:58:45 +03:00
FDnoiseIQ.c first commit 2026-06-01 15:58:45 +03:00
FDnoiseIQ.h first commit 2026-06-01 15:58:45 +03:00
fir.c first commit 2026-06-01 15:58:45 +03:00
fir.h first commit 2026-06-01 15:58:45 +03:00
firmin.c first commit 2026-06-01 15:58:45 +03:00
firmin.h first commit 2026-06-01 15:58:45 +03:00
fmd.c first commit 2026-06-01 15:58:45 +03:00
fmd.h first commit 2026-06-01 15:58:45 +03:00
fmmod.c first commit 2026-06-01 15:58:45 +03:00
fmmod.h first commit 2026-06-01 15:58:45 +03:00
fmsq.c first commit 2026-06-01 15:58:45 +03:00
fmsq.h first commit 2026-06-01 15:58:45 +03:00
gain.c first commit 2026-06-01 15:58:45 +03:00
gain.h first commit 2026-06-01 15:58:45 +03:00
gaussian.c first commit 2026-06-01 15:58:45 +03:00
gaussian.h first commit 2026-06-01 15:58:45 +03:00
gen.c first commit 2026-06-01 15:58:45 +03:00
gen.h first commit 2026-06-01 15:58:45 +03:00
icfir.c first commit 2026-06-01 15:58:45 +03:00
icfir.h first commit 2026-06-01 15:58:45 +03:00
iir.c first commit 2026-06-01 15:58:45 +03:00
iir.h first commit 2026-06-01 15:58:45 +03:00
impulse_cache.c first commit 2026-06-01 15:58:45 +03:00
impulse_cache.h first commit 2026-06-01 15:58:45 +03:00
iobuffs.c first commit 2026-06-01 15:58:45 +03:00
iobuffs.h first commit 2026-06-01 15:58:45 +03:00
iqc.c first commit 2026-06-01 15:58:45 +03:00
iqc.h first commit 2026-06-01 15:58:45 +03:00
linux_port.c first commit 2026-06-01 15:58:45 +03:00
linux_port.h first commit 2026-06-01 15:58:45 +03:00
lmath.c first commit 2026-06-01 15:58:45 +03:00
lmath.h first commit 2026-06-01 15:58:45 +03:00
main.c first commit 2026-06-01 15:58:45 +03:00
main.h first commit 2026-06-01 15:58:45 +03:00
make_calculus.c first commit 2026-06-01 15:58:45 +03:00
make_interface.c first commit 2026-06-01 15:58:45 +03:00
make_zetahat.c first commit 2026-06-01 15:58:45 +03:00
Makefile first commit 2026-06-01 15:58:45 +03:00
Makefile.android first commit 2026-06-01 15:58:45 +03:00
matchedCW.c first commit 2026-06-01 15:58:45 +03:00
matchedCW.h first commit 2026-06-01 15:58:45 +03:00
meter.c first commit 2026-06-01 15:58:45 +03:00
meter.h first commit 2026-06-01 15:58:45 +03:00
meterlog10.c first commit 2026-06-01 15:58:45 +03:00
meterlog10.h first commit 2026-06-01 15:58:45 +03:00
nbp.c first commit 2026-06-01 15:58:45 +03:00
nbp.h first commit 2026-06-01 15:58:45 +03:00
nob.c first commit 2026-06-01 15:58:45 +03:00
nob.h first commit 2026-06-01 15:58:45 +03:00
nobII.c first commit 2026-06-01 15:58:45 +03:00
nobII.h first commit 2026-06-01 15:58:45 +03:00
org_openhpsdr_dsp_Wdsp.c first commit 2026-06-01 15:58:45 +03:00
org_openhpsdr_dsp_Wdsp.h first commit 2026-06-01 15:58:45 +03:00
osctrl.c first commit 2026-06-01 15:58:45 +03:00
osctrl.h first commit 2026-06-01 15:58:45 +03:00
patchpanel.c first commit 2026-06-01 15:58:45 +03:00
patchpanel.h first commit 2026-06-01 15:58:45 +03:00
README.md first commit 2026-06-01 15:58:45 +03:00
resample.c first commit 2026-06-01 15:58:45 +03:00
resample.h first commit 2026-06-01 15:58:45 +03:00
resource.h first commit 2026-06-01 15:58:45 +03:00
rmatch.c first commit 2026-06-01 15:58:45 +03:00
rmatch.h first commit 2026-06-01 15:58:45 +03:00
rnnr.c first commit 2026-06-01 15:58:45 +03:00
rnnr.h first commit 2026-06-01 15:58:45 +03:00
RXA.c first commit 2026-06-01 15:58:45 +03:00
RXA.h first commit 2026-06-01 15:58:45 +03:00
sbnr.c first commit 2026-06-01 15:58:45 +03:00
sbnr.h first commit 2026-06-01 15:58:45 +03:00
sender.c first commit 2026-06-01 15:58:45 +03:00
sender.h first commit 2026-06-01 15:58:45 +03:00
shift.c first commit 2026-06-01 15:58:45 +03:00
shift.h first commit 2026-06-01 15:58:45 +03:00
siphon.c first commit 2026-06-01 15:58:45 +03:00
siphon.h first commit 2026-06-01 15:58:45 +03:00
slew.c first commit 2026-06-01 15:58:45 +03:00
slew.h first commit 2026-06-01 15:58:45 +03:00
snb.c first commit 2026-06-01 15:58:45 +03:00
snb.h first commit 2026-06-01 15:58:45 +03:00
ssql.c first commit 2026-06-01 15:58:45 +03:00
ssql.h first commit 2026-06-01 15:58:45 +03:00
syncbuffs.c first commit 2026-06-01 15:58:45 +03:00
syncbuffs.h first commit 2026-06-01 15:58:45 +03:00
TXA.c first commit 2026-06-01 15:58:45 +03:00
TXA.h first commit 2026-06-01 15:58:45 +03:00
utilities.c first commit 2026-06-01 15:58:45 +03:00
utilities.h first commit 2026-06-01 15:58:45 +03:00
varsamp.c first commit 2026-06-01 15:58:45 +03:00
varsamp.h first commit 2026-06-01 15:58:45 +03:00
version.c first commit 2026-06-01 15:58:45 +03:00
wcpAGC.c first commit 2026-06-01 15:58:45 +03:00
wcpAGC.h first commit 2026-06-01 15:58:45 +03:00
wdsp.h first commit 2026-06-01 15:58:45 +03:00
wisdom.c first commit 2026-06-01 15:58:45 +03:00
zetaHat.bin first commit 2026-06-01 15:58:45 +03:00
zetaHat.c first commit 2026-06-01 15:58:45 +03:00
zetaHat.h first commit 2026-06-01 15:58:45 +03:00

WDSP

DSP library for SDR (Software Defined Radio) applications.

Originally written for Windows by Warren Pratt, NR0V. Ported to Linux and Android by John Melton G0ORX/N6LYT.

Project structure

wdsp/
├── *.c / *.h                    — WDSP library sources
├── org_openhpsdr_dsp_Wdsp.c/.h  — JNI bridge
├── Makefile                     — host build (Linux / macOS)
├── Makefile.android             — Android cross-build
├── java/
│   └── org/openhpsdr/dsp/Wdsp.java
├── third_party/
│   ├── fftw/              — FFTW source (download manually, see below)
│   ├── rnnoise/           — RNNoise noise suppression
│   └── libspecbleach/     — spectral noise reduction
├── obj/                   — object files (generated)
└── lib/                   — built libraries (generated)

Host build (Linux / macOS)

Dependencies

Linux:

sudo apt install build-essential libfftw3-dev pkg-config default-jdk

macOS:

brew install fftw pkg-config

Build

# Full build: static + shared + JNI library + Java classes
make

# Individual targets
make static        # lib/libwdsp.a
make shared        # lib/libwdsp.so  (or .dylib on macOS)
make java          # lib/libwdspj.so + java/build/

Install

sudo make install                    # installs to /usr/local/lib and /usr/local/include
sudo make PREFIX=/opt/wdsp install   # custom prefix
sudo make install_java               # install libwdspj alongside libwdsp

Options

Variable Default Description
PREFIX /usr/local Install prefix
NR34LIB off Set to ON to skip bundled rnnoise/libspecbleach
CC gcc C compiler
CFLAGS -pthread -O3 ... Compiler flags
make NR34LIB=ON    # build without NR3/NR4 noise reduction
make CC=clang

Clean

make clean

Android build

Prerequisites

  1. Android NDK r23 or newer
  2. FFTW source — download and extract into third_party/fftw/:
wget https://www.fftw.org/fftw-3.3.10.tar.gz
tar xf fftw-3.3.10.tar.gz
mv fftw-3.3.10 third_party/fftw
  1. Java compiler — for building the .class file (Android Studio's JBR or any JDK)

Build

make android
# or directly
make -f Makefile.android

Output is placed into:

lib/android/
├── arm64-v8a/
│   ├── libfftw3.so
│   ├── libfftw3f.so
│   ├── libwdsp.so
│   └── libwdspj.so
├── armeabi-v7a/
│   └── ...
├── x86_64/
│   └── ...
└── java/
    └── org/openhpsdr/dsp/Wdsp.class

libwdsp.so has FFTW linked statically — no separate FFTW dependency at runtime on the device.

Options

Variable Default Description
ANDROID_NDK /home/vladimir/Android/Sdk/ndk/29.0.14206865 Path to Android NDK
ANDROID_API 24 Minimum API level
ANDROID_ABIS arm64-v8a armeabi-v7a x86_64 Target ABIs
ANDROID_HOST_TAG auto-detected Host platform (linux-x86_64, darwin-x86_64, etc.)
FFTW_SRC third_party/fftw Path to FFTW source
JAVAC /opt/android-studio/jbr/bin/javac Java compiler
make -f Makefile.android \
    ANDROID_NDK=~/Android/Sdk/ndk/26.3.11579264 \
    ANDROID_API=26 \
    ANDROID_ABIS=arm64-v8a

Clean

make -f Makefile.android clean
# removes obj/android/ and lib/android/

Using in an Android project

Copy lib/android/{abi}/ into your Android project's jniLibs:

app/src/main/jniLibs/
├── arm64-v8a/
│   ├── libwdsp.so
│   └── libwdspj.so
├── armeabi-v7a/
│   └── ...
└── x86_64/
    └── ...

Add Wdsp.java to your source tree and load the libraries at startup:

System.loadLibrary("wdsp");
System.loadLibrary("wdspj");

Or use the singleton:

Wdsp wdsp = Wdsp.getInstance();