summaryrefslogtreecommitdiff
path: root/indra/newview/llvoiceclient.cpp
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2024-06-21 13:22:12 -0700
committerRoxie Linden <roxie@lindenlab.com>2024-06-21 13:22:12 -0700
commit3eab42ebd832545d4ba51a39168110859b869370 (patch)
treed395d729f7604966fb4229f658b396a14d5a047b /indra/newview/llvoiceclient.cpp
parent0f3c3563b0861e8ea82b201aab8343d99f993bbc (diff)
Disable voice morphing and throw up a warning if it's previously enabled.
Diffstat (limited to 'indra/newview/llvoiceclient.cpp')
-rw-r--r--indra/newview/llvoiceclient.cpp33
1 files changed, 30 insertions, 3 deletions
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index fb3377e9c0..779f4e3176 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -137,8 +137,9 @@ LLVoiceClient::LLVoiceClient(LLPumpIO *pump)
mSpatialVoiceModule(NULL),
mNonSpatialVoiceModule(NULL),
m_servicePump(NULL),
- mVoiceEffectEnabled(LLCachedControl<bool>(gSavedSettings, "VoiceMorphingEnabled", true)),
+ mVoiceEffectEnabled(LLCachedControl<bool>(gSavedSettings, "VoiceMorphingEnabled", false)),
mVoiceEffectDefault(LLCachedControl<std::string>(gSavedPerAccountSettings, "VoiceEffectDefault", "00000000-0000-0000-0000-000000000000")),
+ mVoiceEffectSupportNotified(false),
mPTTDirty(true),
mPTT(true),
mUsePTT(true),
@@ -569,11 +570,37 @@ void LLVoiceClient::setMicGain(F32 gain)
//------------------------------------------
// enable/disable voice features
+// static
+bool LLVoiceClient::onVoiceEffectsNotSupported(const LLSD &notification, const LLSD &response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ switch (option)
+ {
+ case 0: // "Okay"
+ gSavedSettings.setBOOL("VoiceMorphingEnabled", FALSE);
+ break;
+
+ case 1: // "Cancel"
+ break;
+
+ default:
+ llassert(0);
+ break;
+ }
+ return false;
+}
+
bool LLVoiceClient::voiceEnabled()
{
static LLCachedControl<bool> enable_voice_chat(gSavedSettings, "EnableVoiceChat");
static LLCachedControl<bool> cmd_line_disable_voice(gSavedSettings, "CmdLineDisableVoice");
- return enable_voice_chat && !cmd_line_disable_voice && !gNonInteractive;
+ bool enabled = enable_voice_chat && !cmd_line_disable_voice && !gNonInteractive;
+ if (enabled && !mVoiceEffectSupportNotified && getVoiceEffectEnabled() && !getVoiceEffectDefault().isNull())
+ {
+ LLNotificationsUtil::add("VoiceEffectsNotSupported", LLSD(), LLSD(), &LLVoiceClient::onVoiceEffectsNotSupported);
+ mVoiceEffectSupportNotified = true;
+ }
+ return enabled;
}
void LLVoiceClient::setVoiceEnabled(bool enabled)
@@ -812,7 +839,7 @@ std::string LLVoiceClient::sipURIFromID(const LLUUID &id)
LLVoiceEffectInterface* LLVoiceClient::getVoiceEffectInterface() const
{
- return getVoiceEffectEnabled() ? dynamic_cast<LLVoiceEffectInterface*>(mSpatialVoiceModule) : NULL;
+ return NULL;
}
///////////////////