+ )
+}
diff --git a/src/renderer/src/components/settings/SettingsPanel.tsx b/src/renderer/src/components/settings/SettingsPanel.tsx
index 3921bb6..7487dd9 100644
--- a/src/renderer/src/components/settings/SettingsPanel.tsx
+++ b/src/renderer/src/components/settings/SettingsPanel.tsx
@@ -283,7 +283,7 @@ function VoiceSettings(): JSX.Element {
description={
none
? "No sound devices were found. Voice needs a running sound server; everything else works without one."
- : 'Used for voice calls. A change takes effect on a call already in progress. Muting is on the status plaque at the foot of the channel list, where it stays reachable during one.'
+ : 'Used for voice calls. A change takes effect on a call already in progress. Muting is on the status plaque at the foot of the channel list, and the call\'s volume on the call itself, where both stay reachable during one.'
}
>
void store.setVoiceDevice('output', id)}
disabled={none}
/>
- {/* The whole call at once, for one that is simply too loud. One
- person is turned up or down on their own tile in the call. */}
-
+ {/* What a Discord call's microphone goes through before it is sent -
+ the processing a Matrix call gets from the browser. The call's
+ volume is on the call itself, not here. */}
+
+ void store.setVoiceProcessing({ echoCancellation: e.target.checked })}
+ />
+
+
)
}
diff --git a/src/renderer/src/state/store.ts b/src/renderer/src/state/store.ts
index fc7102c..3506971 100644
--- a/src/renderer/src/state/store.ts
+++ b/src/renderer/src/state/store.ts
@@ -1382,6 +1382,15 @@ export class ChatStore {
}, 150)
}
+ /** Echo cancellation and noise suppression on a Discord call's microphone. */
+ async setVoiceProcessing(change: { echoCancellation?: boolean; noiseSuppression?: boolean }): Promise {
+ try {
+ this.set({ voicePrefs: await window.moho.rpc('setVoiceProcessing', change) })
+ } catch (e) {
+ this.toast('error', `Couldn't change that: ${(e as Error).message}`)
+ }
+ }
+
/** On a stage: asks to speak, or takes the request back. */
async setStageHand(accountId: string, guildId: string, channelId: string, on: boolean): Promise {
try {
diff --git a/src/shared/wire.ts b/src/shared/wire.ts
index 0524925..e6eaa9f 100644
--- a/src/shared/wire.ts
+++ b/src/shared/wire.ts
@@ -198,6 +198,10 @@ export interface VoicePrefs {
outputVolume?: number
/** People turned up or down, by Discord user id. Absent is 1. */
userVolumes?: Record
+ /** Echo cancellation on a Discord call's microphone. Absent is on. */
+ echoCancellation?: boolean
+ /** Noise suppression on it. Absent is on. */
+ noiseSuppression?: boolean
}
/** Someone sitting in a voice channel. */