Conversation
MonoResampler and resample_buffer() silently returned un-resampled samples when FftFixedIn creation failed with mismatched rates, which would feed wrong-rate audio into the FT8 DSP pipeline. Now both paths log the error and return empty buffers (fail closed). Also sets an explicit CSP in tauri.conf.json instead of disabling it entirely. Addresses Copilot review comments on PR #252. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Delete the closed-source prebuilt libft8cn.so (4 ABIs) and build all native FT8/FT4/FT2 functionality from the in-tree kgoba ft8_lib (pinned at 6f528128). Five new JNI wrapper files replace the 21 entry points the prebuilt provided: - ft8_encode_jni.cpp: pack77, packFreeTextTo77, ft8/ft4_encode, synth_gfsk - ft8_hash_jni.cpp: getHash10/12/22 (WSJT-X n22 algorithm) - ft8_fft_jni.cpp: 8 FFT display methods on SpectrumView/SpectrumFragment - ft8_resample_jni.cpp: 6 windowed-sinc resampler methods on FT8Resample - ft8_decode_jni.cpp: 9 decoder methods + doSubtractSignal for FT8 The two shared libraries (libft8cn.so + libft8af_usb.so) merge into a single libft8af.so. CMakeLists.txt adds encode.c to ft8af_dsp, removes the prebuilt import block and -fvisibility=hidden, and renames the output library. All 10 Java loadLibrary call sites updated from "ft8cn"/"ft8af_usb" to "ft8af". build.gradle drops jniLibs.srcDirs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Return empty arrays instead of nullptr on error paths in all 6 FT8Resample JNI methods to prevent NPE in Java callers. - Remove dead first assignment in resample_float_to_float (output[i] was written twice; the first complex normalization was immediately overwritten). - Replace O(n*win) inner loop in FFT denoising with prefix-sum for O(1) per-bin window average computation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Java package: com.bg7yoz.ft8cn → com.k1af.ft8af
- Kotlin package: radio.ks3ckc.ft8us → radio.ks3ckc.ft8af
- Module directory: ft8cn/ → ft8af/
- C++ glue directory: ft8cn_glue/ → ft8af_glue/
- JNI function prefix: Java_com_bg7yoz_ft8cn_ → Java_com_k1af_ft8af_
- Class renames: RadioGroupFt8cn → RadioGroupFt8af, FT8US* → FT8AF*
- Theme: Theme.Ft8CN → Theme.Ft8AF
- Gradle rootProject: Ft8CN → Ft8AF
- CI workflows, desktop build, and docs updated accordingly
The applicationId (radio.ks3ckc.ft8af), System.loadLibrary("ft8af"),
and BG7YOZ attribution are unchanged. Historical references to
libft8cn.so and Xiegu ft8cns protocol names are intentionally kept.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace prebuilt libft8cn.so with from-source libft8af.so
Rename packages and module directory to new identity
Two compounding bugs in ft8_snr() inflated FT8 signal reports: 1. Data symbols (58 of 79) used max-of-8-tones as "signal", adding a constant positive bias even for noise — dominating the 21 sync symbols where the expected tone is known. 2. Waterfall magnitudes are 0.5 dB/unit (monitor_process: 2*db+240) but the return value was not halved, doubling all reports. Restrict estimation to Costas sync symbols only (matching the FT4 path and ft8_sync_score's structure) and divide by 2 for real dB. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Keep the ft8af_usb → ft8af target rename from this branch while incorporating the 16KB page-size link option added on dev. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
libft8cn.sowith from-sourcelibft8af.sobuilt via CMake/NDKcom.bg7yoz.ft8cn→com.k1af.ft8afradio.ks3ckc.ft8us→radio.ks3ckc.ft8afft8cn/→ft8af/, C++ glueft8cn_glue/→ft8af_glue/Test plan
./gradlew assembleDebug— clean build./gradlew testDebugUnitTest— all unit tests passbash ft8af/app/src/main/cpp/ft8af_glue/run_host_tests.sh— native tests pass🤖 Generated with Claude Code