PWN::SDR::Decoder::DSP
DSP primitives shared by every PWN::SDR::Decoder::* module. Default path is pure Ruby operating on Array<Float> samples normalised to -1.0..1.0 (48 kHz s16le mono from GQRX UDP — no sox / multimon-ng / minimodem dependency). When the matching system library is present the hot paths transparently accelerate via PWN::FFI::{Volk,Liquid,FFTW}: unpack_s16le → PWN::FFI::Volk (SIMD s16→f32 convert) unpack_cs16le → pure / Volk path (interleaved I/Q s16 → f32) unpack_cu8 → pure path (RTL-SDR u8 I/Q → f32) resample → PWN::FFI::Liquid (msresamp multi-stage) dc_block → PWN::FFI::Liquid (firfilt DC blocker) rms_dbfs → PWN::FFI::Volk (accumulate of squares) mag_sq / fm_demod_iq → true-air I/Q paths for Base.run_iq Packed IQ/FM/magnitude and radix-2 FFT use optional DSPNative first. Build explicitly with ruby ext/pwn_dsp/build.rb; no runtime compilation. process_iq exposes :ruby degradation and keeps caller-owned chunk state. Other accelerated methods fall back to pure Ruby when their backend is missing or raises, so decoders never require a native library at install time. Force pure Ruby for testing with PWN::SDR::Decoder::DSP.native = false
When to use
Call PWN::SDR::Decoder::DSP from pwn_eval when the task needs this module.
Do not reimplement it in shell.
Methodologies
Generated from pwn/sdr/decoder/dsp.rb. Prefer the public class methods below.
Class methods take (opts = {}) and read opts.
How to call
PWN::SDR::Decoder::DSP.help
PWN::SDR::Decoder::DSP.unpack_s16le(opts)
Public methods
unpack_s16leresamplegoertzelenvelopedc_blocknrz_sliceenvelope_signedfsk_slicefind_syncbits_to_inteven_parity_okbch_31_21_syndromebaudot_decoderms_dbfsunpack_cs16leunpack_cu8mag_sqfm_demod_iqiq_rms_dbfscorrelateresample_iqmix_iqgfsk_sliceslice_4fskmanchester_decodediff_decodebytes_from_bitscrc16whiten_lfsrook_pulsescfft_magdft_naivezadoff_chuca_codecmulprocess_iqauthorshelpeven_parity_ok?nativenative=
Source
pwn/sdr/decoder/dsp.rb
Verification
PWN::SDR::Decoder::DSP.respond_to?(:unpack_s16le) after the
module is loaded. Read the source for parameter names.