Repository navigation
feat(audio): mono audio toggle - #3539
Conversation
a6fa137 to
247dd9c
Compare
| @@ -8548,6 +8548,15 @@ | |||
| "shell" | |||
| ] | |||
| }, | |||
| { | |||
There was a problem hiding this comment.
Best to not committ any changes to en.json/template.json - they are auto-generated
|
/claude review |
| // Detect mono audio support and mirror the live state into the setting | ||
| queryMonoSetting((supported, currentValue) => { | ||
| if (supported) | ||
| SettingsData.audioMono = currentValue; |
There was a problem hiding this comment.
This makes the saved audioMono setting useless across restarts. pactl send-message and wpctl settings without --save are runtime-only, so after a reboot or a PipeWire restart the live value is false. This line then replaces the user's saved true with false, and it is never re-applied. Mono silently turns off for the user who relies on it.
Fix: apply the saved preference when support is detected instead of mirroring the live state, e.g. if (supported && currentValue !== SettingsData.audioMono) setMonoSetting(SettingsData.audioMono);. This also makes sure the query runs after settings finish loading.
Claude reviewOne real bug: the saved mono preference is lost on restart.
Checked: AudioService mono query/set/IPC, the Connections handler and Proc debounce interaction, AudioTab toggle and revert, SettingsSpec/SettingsData wiring, translation usage (en.json/template.json edits already flagged). Model: claude-opus-5-5. |
247dd9c to
259ecc7
Compare
|
/claude review |
| tab: "audio" | ||
| tags: ["audio", "mono"] | ||
| settingKey: "audioMono" | ||
| text: I18n.tr("Mono Audio") |
There was a problem hiding this comment.
Several new strings have no translator context, which CONTRIBUTING.md requires: I18n.tr("Mono Audio") here, and in AudioService.qml "Mono audio enabled", "Mono audio not supported", "Mono audio toggle sent" and the second "Mono Audio" in getmono. Add a context argument to each, e.g. I18n.tr("Mono Audio", "Audio settings: mono audio toggle") to match the card title.
The IPC replies (setmono/getmono) may not need I18n.tr at all. Other IPC handlers in this file return plain English (e.g. "Audio muted"), and scripts parse this output.
Claude reviewThe startup overwrite bug from the last review is fixed. One CONTRIBUTING issue remains.
Checked: startup re-apply of the saved preference, settings-load handler, query guard, the Proc debounce interaction between the Connections handler and the toggle/IPC callbacks, failure revert, SettingsSpec/SettingsData wiring, search index entry. Model: claude-opus-5-5. |
259ecc7 to
f208596
Compare
|
@bbedward Anything else? I did want to ask if this is a good feature to add |
|
/claude review |
Claude reviewNo issues found. Both earlier findings are fixed: the saved preference is re-applied on startup, and the settings strings now have translator context. Checked: startup re-apply after settings load (the double call is blocked by the query guard), pactl/wpctl detection and fallback, how Proc debounce merges the Connections and toggle/IPC set calls, revert on failure, IPC setmono/getmono, SettingsSpec/SettingsData wiring, search index entry. en.json/template.json are no longer touched. Model: claude-opus-5-5. |
Description
This PR adds a Mono Audio accessibility toggle to the audio settings. When enabled, all audio output is mixed down to a single channel, useful for users with hearing loss in one ear, or if one of their earbuds are lost
Consists of a:
pactl send-message /core pipewire-pulse:force-mono-outputAvailable commands are:
dms ipc call audio setmono true# enable monodms ipc call audio setmono false# disable monodms ipc call audio getmono# report stateType of change
Related issues
Screenshots / video
Checklist
I18n.tr()with translator context, reusing existing terms where possiblemake fmt, added/updated tests,make testpasses, andgo mod tidyis cleanmake lint-qmlwith no new warnings