Make the talking-while-muted beep optional
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -138,6 +138,8 @@ public final class Settings {
|
||||
public boolean typingAttenuation = true;
|
||||
/** Automatic gain control: normalise microphone loudness to a target level. */
|
||||
public boolean agc = true;
|
||||
/** Beep when speech is picked up while the microphone is muted. */
|
||||
public boolean mutedTalkWarning = true;
|
||||
|
||||
// ---- notification sounds ----
|
||||
/** Directory name of the active sound pack; empty picks the first one found. */
|
||||
@@ -258,6 +260,7 @@ public final class Settings {
|
||||
denoise = parseB(props.getProperty("denoise"), denoise);
|
||||
denoiserLevel = parseD(props.getProperty("denoiserLevel"), denoiserLevel);
|
||||
typingAttenuation = parseB(props.getProperty("typingAttenuation"), typingAttenuation);
|
||||
mutedTalkWarning = parseB(props.getProperty("mutedTalkWarning"), mutedTalkWarning);
|
||||
agc = parseB(props.getProperty("agc"), agc);
|
||||
soundPack = props.getProperty("soundPack", soundPack);
|
||||
soundVolume = parseD(props.getProperty("soundVolume"), soundVolume);
|
||||
@@ -307,6 +310,7 @@ public final class Settings {
|
||||
props.setProperty("denoise", Boolean.toString(denoise));
|
||||
props.setProperty("denoiserLevel", Double.toString(denoiserLevel));
|
||||
props.setProperty("typingAttenuation", Boolean.toString(typingAttenuation));
|
||||
props.setProperty("mutedTalkWarning", Boolean.toString(mutedTalkWarning));
|
||||
props.setProperty("agc", Boolean.toString(agc));
|
||||
props.setProperty("soundPack", soundPack);
|
||||
props.setProperty("soundVolume", Double.toString(soundVolume));
|
||||
|
||||
@@ -543,6 +543,7 @@ public final class TeamspeakConnection implements TS3Listener {
|
||||
|
||||
/** Reminds the user, at most every few seconds, that the microphone is muted. */
|
||||
private void onTalkingWhileMuted() {
|
||||
if (!settings.mutedTalkWarning) return;
|
||||
long now = System.nanoTime();
|
||||
if (now - lastMutedTalkNanos < MUTED_TALK_COOLDOWN_NANOS) return;
|
||||
lastMutedTalkNanos = now;
|
||||
|
||||
Reference in New Issue
Block a user