summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-04-17 16:42:38 -0700
committerTodd Stinson <stinson@lindenlab.com>2012-04-17 16:42:38 -0700
commit8c5819bdde26ad748060be53a2b6fefe809ad18b (patch)
tree5439c6ce328ba68bfd3debde486f227ede3de9fc /indra/newview/llvoavatar.cpp
parent234ce663fa52a588662153e6e465a53643c4e0f4 (diff)
CHUI-86: Removing the LLHUDEffect parent class from the LLVoiceVisualizer. #ifdef'ing the code out for now, to be removed later.
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r--indra/newview/llvoavatar.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index b420812a3c..e1d29da664 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -709,9 +709,13 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
LLMemType mt(LLMemType::MTYPE_AVATAR);
//VTResume(); // VTune
+#ifdef XXX_STINSON_CHUI_REWORK
// mVoiceVisualizer is created by the hud effects manager and uses the HUD Effects pipeline
const BOOL needsSendToSim = false; // currently, this HUD effect doesn't need to pack and unpack data to do its job
mVoiceVisualizer = ( LLVoiceVisualizer *)LLHUDManager::getInstance()->createViewerEffect( LLHUDObject::LL_HUD_EFFECT_VOICE_VISUALIZER, needsSendToSim );
+#else // XXX_STINSON_CHUI_REWORK
+ mVoiceVisualizer = new LLVoiceVisualizer();
+#endif // XXX_STINSON_CHUI_REWORK
lldebugs << "LLVOAvatar Constructor (0x" << this << ") id:" << mID << llendl;
@@ -870,7 +874,11 @@ void LLVOAvatar::markDead()
mNameText = NULL;
sNumVisibleChatBubbles--;
}
+#ifdef XXX_STINSON_CHUI_REWORK
mVoiceVisualizer->markDead();
+#else // XXX_STINSON_CHUI_REWORK
+ mVoiceVisualizer->setStopSpeaking();
+#endif // XXX_STINSON_CHUI_REWORK
LLLoadedCallbackEntry::cleanUpCallbackList(&mCallbackTextureList) ;
LLViewerObject::markDead();
}
@@ -1328,7 +1336,9 @@ void LLVOAvatar::initInstance(void)
//VTPause(); // VTune
+#ifdef XXX_STINSON_CHUI_REWORK
mVoiceVisualizer->setVoiceEnabled( LLVoiceClient::getInstance()->getVoiceEnabled( mID ) );
+#endif // XXX_STINSON_CHUI_REWORK
}
@@ -2424,6 +2434,7 @@ BOOL LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
{
+#ifdef XXX_STINSON_CHUI_REWORK
bool render_visualizer = voice_enabled;
// Don't render the user's own voice visualizer when in mouselook, or when opening the mic is disabled.
@@ -2436,6 +2447,7 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
}
mVoiceVisualizer->setVoiceEnabled(render_visualizer);
+#endif // XXX_STINSON_CHUI_REWORK
if ( voice_enabled )
{
@@ -2511,6 +2523,7 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
}
}
+#ifdef XXX_STINSON_CHUI_REWORK
//--------------------------------------------------------------------------------------------
// here we get the approximate head position and set as sound source for the voice symbol
// (the following version uses a tweak of "mHeadOffset" which handle sitting vs. standing)
@@ -2528,6 +2541,7 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
tagPos[VZ] += ( mBodySize[VZ] + 0.125f );
mVoiceVisualizer->setVoiceSourceWorldPosition( tagPos );
}
+#endif // XXX_STINSON_CHUI_REWORK
}//if ( voiceEnabled )
}