Cues: send/receive checkboxes' own cue sounds take priority over the generic checkbox sound

The Send/receive checkboxes have dedicated cue sounds (send/receive turned on/off) AND would
otherwise also fire the generic checkbox tick/untick. AccessibleCheckBox gains a SuppressCheckSound
gate; the send/receive checkboxes set it so that when their dedicated cue is on, only that cue
plays. When the dedicated cue is "(none)", the gate returns false and the generic checkbox sound
plays as normal - so the checkbox sound never overrides the purpose-built send/receive sounds.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Ednunp
2026-06-13 06:53:36 +01:00
co-authored by Claude Opus 4.8
parent 2eaf7da184
commit 56417eb7c3
2 changed files with 16 additions and 2 deletions
+5
View File
@@ -1009,6 +1009,11 @@ public sealed class MainForm : Form
// --- Wire main-form events ---
receiveAudioCheckbox.CheckedChanged += (_, _) => OnStreamingCheckboxChanged(receiveAudioCheckbox);
sendMyAudioCheckbox.CheckedChanged += (_, _) => OnStreamingCheckboxChanged(sendMyAudioCheckbox);
// Send/receive have their own dedicated cue sounds (send/receive turned on/off). When that
// dedicated cue is on, only it plays - suppress the generic checkbox tick/untick on these two.
// When the dedicated cue is "(none)", these return false and the checkbox sound plays as normal.
sendMyAudioCheckbox.SuppressCheckSound = on => on ? AppConfig.Load().EnableSendOnCue : AppConfig.Load().EnableSendOffCue;
receiveAudioCheckbox.SuppressCheckSound = on => on ? AppConfig.Load().EnableReceiveOnCue : AppConfig.Load().EnableReceiveOffCue;
volumeBar.Scroll += (_, _) => { receiver.Volume = volumeBar.Value / 100f; MarkProfileDirty(); };
WireCheckedListAccessibility(receiveOutputDevicesList, receiveOutputDevicesStatusLabel, "receive output device");
receiveOutputDevicesList.ItemCheck += (_, e) =>