Skip to content

bug(cwx): CW sidetone ignores speaker mute — dedicated sink bypasses AudioEngine::setMuted() #2755

Description

@NF0T

Summary

The local CW sidetone continues playing when the top-bar speaker mute is active. Muting the system speaker icon in the AetherSDR title bar has no effect on sidetone output.

Muting the active slice's audio also has no effect on the sidetone, though this is a separate question — see analysis below.

Steps to reproduce

  1. Open CWX panel with slice in CW or CWL mode
  2. Enable the speaker mute in the AetherSDR title bar (or slice audio mute)
  3. Key a CW transmission (Live mode, Send, or F-key macro)
  4. Expected: sidetone is silent while muted
  5. Actual: sidetone plays at full volume regardless of mute state

Root cause

The CW sidetone runs on a dedicated, independent audio output sink (m_sidetoneSink — either CwSidetonePortAudioSink or CwSidetoneQAudioSink) separate from the main RX audio sink (m_audioSink). This is intentional for low-latency keying.

AudioEngine::setMuted() only silences m_audioSink:

void AudioEngine::setMuted(bool muted)
{
    m_muted.store(muted);
    if (m_audioSink)
        m_audioSink->setVolume(muted ? 0.0f : m_rxVolume.load());
    // m_sidetoneSink is never touched
}

m_sidetoneSink is not informed of the mute state, so CwSidetoneGenerator::process() continues generating audio samples unconditionally.

Slice audio mute — separate question

SliceModel::setAudioMute(true) sends audio_mute=1 to the radio, stopping the DAX RX audio stream. This silences m_audioSink (no incoming samples), but has no effect on the sidetone because the sidetone is locally synthesized — it is not part of the DAX stream. Whether slice audio mute should silence the sidetone is a UX question for maintainer review; the speaker mute case is the clear bug.

Proposed fix

Add a setMasterMuted(bool) atomic to CwSidetoneGenerator (matching the existing m_enabled atomic pattern). Check it at the top of process() alongside m_enabled. In AudioEngine::setMuted(), propagate the flag to m_cwSidetone. This preserves the user's configured sidetone volume and enable state independently of the mute gate.

Environment

  • AetherSDR 26.5.1
  • Linux x86_64
  • FLEX-8400 firmware 4.1.5.39794
  • Confirmed: speaker mute via title bar has no effect on sidetone output

Metadata

Metadata

Assignees

No one assigned

    Labels

    CWCW keying, decode, and operationaudioAudio engine and streamingbugSomething isn't workingmaintainer-reviewRequires maintainer review before any action is taken

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions