Skip to content

Fix TCI audio header length and mono TX handling (#1239)#1264

Merged
ten9876 merged 1 commit into
mainfrom
aetherclaude/issue-1239
Apr 14, 2026
Merged

Fix TCI audio header length and mono TX handling (#1239)#1264
ten9876 merged 1 commit into
mainfrom
aetherclaude/issue-1239

Conversation

@aethersdr-agent

Copy link
Copy Markdown
Contributor

Summary

Fixes #1239


Generated by AetherClaude (automated agent for AetherSDR)

Fix four bugs in TciServer causing TCI audio decode/encode failures:

1. buildAudioFrame(): set hdr.length to per-channel sampleCount instead
   of totalFloats (frames × channels). TCI spec requires per-channel count;
   the doubled value caused WSJT-X to overrun into opposite channel data.

2. onRxAudioReady() int16 stereo path: same fix — use audioFrames (per-
   channel) instead of srcSamples (total) for hdr.length.

3. onBinaryMessage() TX path: detect mono vs stereo from payload size
   relative to hdr.length. WSJT-X sends mono float32; treating it as
   stereo halved the effective sample rate, shifting FT8 tone frequencies.

4. audio_stream_sample_type parsing: handle string format names
   ("float32", "int16") in addition to numeric values, since toInt()
   silently returns 0 for non-numeric strings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ten9876 ten9876 force-pushed the aetherclaude/issue-1239 branch from 3c79ac9 to 55e366c Compare April 14, 2026 00:07
@ten9876 ten9876 marked this pull request as ready for review April 14, 2026 00:12
@ten9876 ten9876 self-requested a review as a code owner April 14, 2026 00:12
@ten9876 ten9876 merged commit 3961d9c into main Apr 14, 2026
4 checks passed
@ten9876 ten9876 deleted the aetherclaude/issue-1239 branch April 14, 2026 00:12
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.

TCI Audio Won't decode or encode Properly

2 participants