Skip to content

feat(sdr): OpenWebRX IMA ADPCM decoder (A3) - #184

Merged
SamoTech merged 2 commits into
mainfrom
feat/owrx-adpcm-v2
Nov 23, 2026
Merged

SamoTech merged 2 commits into
mainfrom
feat/owrx-adpcm-v2

Conversation

@SamoTech

Copy link
Copy Markdown
Owner

Implements ROADMAP item A3: clean-room IMA ADPCM decoding for the OpenWebRX native adapter.

  • New js/modules/owrx-adpcm.mjs: clean-room IMA ADPCM decoder (no copied code); step/index tables verified value-by-value against csdr ima_adpcm.c; low-first nibble order; SYNC markers resync mid-stream and across WebSocket chunks; a trailing partial SYNC prefix is held for the next message, never decoded as audio.
  • Wired into js/modules/openwebrx-native.mjs: config gate accepts none and adpcm only (unknown compression still fails closed with unsupported_codec); one continuous ADPCM audio stream per DSP session, reset on connect and profile change; ADPCM FFT frames decode to dB bins (10 lead-in pads dropped, values /100).
  • Tests: new tests/owrx-adpcm.test.cjs (11 tests: full table vs csdr, hand-traced vector [0x77, 0x08] -> [11, 41, 37, 40], SYNC resync, prefix hold, index clamp, invalid input, round-trip, ADPCM FFT) + 3 new tests in tests/openwebrx-native.test.cjs (ADPCM audio at 12/48 kHz, ADPCM FFT dB, profile-change reset); the closed-failure case moved from adpcm to bogus-codec.
  • scripts/openwebrx_audio_qa.cjs: the unsupported QA case now sends bogus-codec (ADPCM is supported now).
  • Service Worker v102 -> v103 (new module owrx-adpcm.mjs in SHELL) + README/ROADMAP/PROJECT_STATUS/AI_HANDOVER synced in the same PR.

Local gates (run on the exact reconciled content): node --check app.js + all modules OK; Node tests 245/245 pass; Python tests 129 OK.

Open item: no live ADPCM fixture exists — live listening verification against a real ADPCM receiver is still open (the decoder is verified by hand-traced vectors, round-trips and the csdr table only).

@SamoTech
SamoTech merged commit 3e8f8f8 into main Nov 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant