summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-06-27 20:52:28 +0800
committerErik Kundiman <erik@megapahit.org>2024-06-27 20:52:28 +0800
commit191170d4328c9d2356d99428276ba2f77977d2af (patch)
treedeebd5b29213d2a60104f0d09dba6e82c5afbeb5 /indra/newview/llvoavatar.cpp
parent9890ebc0978e0ec3567fb78dba4bd2d4a18855f3 (diff)
parent9bc3dfbdeaba904999880f6b59306128c98469e8 (diff)
Merge remote-tracking branch 'secondlife/release/webrtc-voice' into webrtc-voice
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r--indra/newview/llvoavatar.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index d7382eaac6..258ab80ea4 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -614,7 +614,8 @@ BOOL LLVOAvatar::sShowAnimationDebug = FALSE;
BOOL LLVOAvatar::sVisibleInFirstPerson = FALSE;
F32 LLVOAvatar::sLODFactor = 1.f;
F32 LLVOAvatar::sPhysicsLODFactor = 1.f;
-BOOL LLVOAvatar::sJointDebug = FALSE;
+BOOL LLVOAvatar::sJointDebug = FALSE;
+BOOL LLVOAvatar::sLipSyncEnabled = FALSE;
F32 LLVOAvatar::sUnbakedTime = 0.f;
F32 LLVOAvatar::sUnbakedUpdateTime = 0.f;
F32 LLVOAvatar::sGreyTime = 0.f;
@@ -1155,6 +1156,7 @@ void LLVOAvatar::initClass()
LLControlAvatar::sRegionChangedSlot = gAgent.addRegionChangedCallback(&LLControlAvatar::onRegionChanged);
sCloudTexture = LLViewerTextureManager::getFetchedTextureFromFile("cloud-particle.j2c");
+ gSavedSettings.getControl("LipSyncEnabled")->getSignal()->connect(boost::bind(&LLVOAvatar::handleVOAvatarPrefsChanged, _2));
}
@@ -1162,6 +1164,12 @@ void LLVOAvatar::cleanupClass()
{
}
+bool LLVOAvatar::handleVOAvatarPrefsChanged(const LLSD &newvalue)
+{
+ sLipSyncEnabled = gSavedSettings.getBOOL("LipSyncEnabled");
+ return true;
+}
+
// virtual
void LLVOAvatar::initInstance()
{
@@ -3057,7 +3065,7 @@ void LLVOAvatar::idleUpdateLipSync(bool voice_enabled)
// Use the Lipsync_Ooh and Lipsync_Aah morphs for lip sync
if ( voice_enabled
&& mLastRezzedStatus > 0 // no point updating lip-sync for clouds
- && (LLVoiceClient::getInstance()->lipSyncEnabled())
+ && sLipSyncEnabled
&& LLVoiceClient::getInstance()->getIsSpeaking( mID ) )
{
F32 ooh_morph_amount = 0.0f;
@@ -9341,8 +9349,8 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe
}
else
{
- LL_DEBUGS("Avatar") << "AvatarAppearance msg received without any parameters, object: " << getID() << LL_ENDL;
- }
+ LL_DEBUGS("Avatar") << "AvatarAppearance msg received without any parameters, object: " << getID() << LL_ENDL;
+ }
LLVisualParam* appearance_version_param = getVisualParam(11000);
if (appearance_version_param)