I'm experiencing an issue with AetherSDR, a Linux/macOS/Windows SDR client for FlexRadio transceivers (https://github.com/ten9876/AetherSDR). My system: - AetherSDR version: 0.7.18.3 - Qt version: 6.7.3 - OS: Windows - Radio: FLEX-6400 fw 4.0.1.39161 Before writing the bug report, please read the AetherSDR project context at https://raw.githubusercontent.com/ten9876/AetherSDR/main/CLAUDE.md for architecture overview, data flow, protocol details, and known issues. Based on my description below, write a complete GitHub bug report. Do NOT ask me follow-up questions — just write the best report you can from what I've provided. Output it in one response, ready to paste. Use GitHub-flavored Markdown formatting (headers, code blocks, bullet points). Format it as: ### Title: (short, descriptive) ### What happened? (expand on my description with clear, specific language) ### What did you expect? (infer the expected behavior from context) ### Steps to reproduce (numbered steps based on my description) ### Radio model & firmware (pre-filled above) ### OS & version (pre-filled above) ### Developer Notes (After reviewing the codebase, suggest which source files and functions are most likely involved, what logging categories to enable in Help → Support to capture diagnostic data, and any potential root causes based on the code architecture. Reference specific file paths and line numbers where possible.) Here is my issue: [With the AGC off, the receive audio is too quiet. I have to turn the AGCT and AF gains up very high to hear audio. I am in CW mode.] Show less 9:07 PM Fetched: https://raw.githubusercontent.com/ten9876/AetherSDR/main/CLAUDE.md Fetched: https://raw.githubusercontent.com/ten9876/AetherSDR/main/CLAUDE.md Here is the complete GitHub bug report, ready to paste: Title: CW mode audio too quiet with AGC off — excessive AGCT/AF gain required to hear audio What happened? When operating in CW mode with AGC disabled, the received audio is extremely quiet — effectively inaudible at normal gain settings. To produce a listenable audio level, both the AGC Threshold (AGCT) slider and the AF Gain slider must be pushed very high (far beyond what would be needed with AGC enabled, or in other modes under similar signal conditions). This suggests that without AGC active, the audio signal path is not applying sufficient baseline gain to the received audio before it reaches the QAudioSink, and/or that the CW mode passband/DSP pipeline is attenuating the signal in a way that is not compensated for when AGC is off. What did you expect? With AGC disabled, the AF Gain control alone should provide enough range to achieve a comfortable listening volume at normal slider positions (e.g., 50–75%). The AGCT (AGC threshold) control is not intended as a substitute volume control and should not need to be pushed to its extreme to produce audible audio when AGC is off. The behavior should be comparable to other modes (e.g., USB/LSB) when AGC is similarly disabled. Steps to reproduce Connect AetherSDR 0.7.18.3 to a FLEX-6400 running firmware 4.0.1.39161. Set a slice to CW mode (CWU or CWL). Open the RX Applet and set AGC mode to OFF. Tune to a frequency with an active CW signal (or use a known beacon/test signal). Set AF Gain to a normal operating level (e.g., 50%). Observe that received audio is extremely quiet or effectively inaudible. Gradually increase AF Gain and/or AGCT — note that unusually high values are required to achieve audible audio output. Radio model & firmware Radio: FLEX-6400 Firmware: 4.0.1.39161 OS & version OS: Windows AetherSDR version: 0.7.18.3 Qt version: 6.7.3 Developer Notes Based on a review of the CLAUDE.md architecture document, the following areas are most likely involved: Primary suspects: src/core/AudioEngine.cpp — feedAudioData() and volume/gain pipeline The VITA-49 audio path for CW (PCC 0x03E3, float32 stereo big-endian) flows into AudioEngine::feedAudioData(), which byte-swaps, scales to int16, and feeds QAudioSink. If AGC is off, the radio sends a lower-level signal without automatic gain compensation, and the client-side scaling (the float32 → int16 conversion factor) may be insufficient to boost the signal to an audible level. Check the scalar multiplier applied before the memcpy to int16 — it may be fixed at 1.0 or calibrated assuming AGC is always on. src/core/AudioEngine.cpp — Volume boost logic CLAUDE.md notes a volume boost feature: "AF gain slider extends to 200% (+6 dB) with software gain." Verify that this software gain is being correctly applied when AGC is off, and that the gain value derived from the AGCT/AF sliders is properly plumbed through to the audio scaling step in feedAudioData(). src/gui/RxApplet.cpp — AGC mode change handling When AGC is set to OFF in the RX Applet, a command is sent to the radio (likely slice set agc_mode=off). Confirm that the radio's response correctly populates SliceModel, and that AudioEngine is notified of any gain compensation that may need to change client-side as a result. src/models/SliceModel.cpp — CW mode filter/DSP state CLAUDE.md notes: "Filter width presets are mode-aware: CW centers 200 Hz above." In CW mode, the passband is narrow (typically 200–500 Hz). Confirm that the SpectralNR (NR2) or RNNoiseFilter (RN2) pipeline, if active, is not inadvertently attenuating the CW tone when the signal level is low and AGC is off. Even if NR/NF/NB are toggled off in the UI, check whether mode-change logic triggers any DSP state change that affects gain. src/core/CwDecoder.cpp — feedAudio() side-chain In CW mode, audio is also routed to CwDecoder::feedAudio(). While this should be a read-only tap, confirm no unintended in-place modification of audio buffers occurs before the data is passed to QAudioSink. Suggested diagnostic steps: Enable the following logging categories in Help → Support: Audio — to capture feedAudioData() buffer levels, sample scaling, and sink state DSP / NR — to verify NR2/RN2 pipeline gain stages are not attenuating audio Slice / Protocol — to confirm agc_mode=off and agc_threshold commands are being sent and acknowledged by the radio correctly Log the raw float32 sample magnitude arriving from VITA-49 with AGC off vs. on to determine whether the attenuation is happening radio-side (signal is arriving quiet) or client-side (signal arrives at normal level but is being scaled down). Compare audio_gain / AF gain command values sent to the radio in both AGC-on and AGC-off states to check for any unintended reset or clamping. Protocol note: The relevant radio-side commands to verify in logs are: slice set agc_mode=off slice set agc_threshold= slice set audio_gain= Confirm the radio is acknowledging these with R|00000000| (success) and that subsequent S|slice status messages reflect the updated values. Claude is AI and can make mistakes. Please double-check responses.