From 8c5819bdde26ad748060be53a2b6fefe809ad18b Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Tue, 17 Apr 2012 16:42:38 -0700 Subject: CHUI-86: Removing the LLHUDEffect parent class from the LLVoiceVisualizer. #ifdef'ing the code out for now, to be removed later. --- indra/newview/llvoicevisualizer.h | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) (limited to 'indra/newview/llvoicevisualizer.h') diff --git a/indra/newview/llvoicevisualizer.h b/indra/newview/llvoicevisualizer.h index e434c7f3f1..6258de163d 100644 --- a/indra/newview/llvoicevisualizer.h +++ b/indra/newview/llvoicevisualizer.h @@ -42,7 +42,11 @@ #ifndef LL_VOICE_VISUALIZER_H #define LL_VOICE_VISUALIZER_H +#ifdef XXX_STINSON_CHUI_REWORK #include "llhudeffect.h" +#else // XXX_STINSON_CHUI_REWORK +#include "llpointer.h" +#endif // XXX_STINSON_CHUI_REWORK //----------------------------------------------------------------------------------------------- // The values of voice gesticulation represent energy levels for avatar animation, based on @@ -60,34 +64,45 @@ enum VoiceGesticulationLevel NUM_VOICE_GESTICULATION_LEVELS }; +#ifdef XXX_STINSON_CHUI_REWORK const static int NUM_VOICE_SYMBOL_WAVES = 7; +#endif // XXX_STINSON_CHUI_REWORK //---------------------------------------------------- // LLVoiceVisualizer class //---------------------------------------------------- +#ifdef XXX_STINSON_CHUI_REWORK class LLVoiceVisualizer : public LLHUDEffect +#else // XXX_STINSON_CHUI_REWORK +class LLVoiceVisualizer : public LLRefCount +#endif // XXX_STINSON_CHUI_REWORK { //--------------------------------------------------- // public methods //--------------------------------------------------- public: - LLVoiceVisualizer ( const U8 type ); //constructor +#ifdef XXX_STINSON_CHUI_REWORK + LLVoiceVisualizer( const U8 type ); //constructor +#else // XXX_STINSON_CHUI_REWORK + LLVoiceVisualizer(); //constructor +#endif // XXX_STINSON_CHUI_REWORK ~LLVoiceVisualizer(); //destructor - - friend class LLHUDObject; +#ifdef XXX_STINSON_CHUI_REWORK void setVoiceSourceWorldPosition( const LLVector3 &p ); // this should be the position of the speaking avatar's head void setMinGesticulationAmplitude( F32 ); // the lower range of meaningful amplitude for setting gesticulation level void setMaxGesticulationAmplitude( F32 ); // the upper range of meaningful amplitude for setting gesticulation level +#endif // XXX_STINSON_CHUI_REWORK void setStartSpeaking(); // tell me when the av starts speaking +#ifdef XXX_STINSON_CHUI_REWORK void setVoiceEnabled( bool ); // tell me whether or not the user is voice enabled +#endif // XXX_STINSON_CHUI_REWORK void setSpeakingAmplitude( F32 ); // tell me how loud the av is speaking (ranges from 0 to 1) void setStopSpeaking(); // tell me when the av stops speaking bool getCurrentlySpeaking(); // the get for the above set VoiceGesticulationLevel getCurrentGesticulationLevel(); // based on voice amplitude, I'll give you the current "energy level" of avatar speech - static void setPreferences( ); - static void lipStringToF32s ( std::string& in_string, F32*& out_F32s, U32& count_F32s ); // convert a string of digits to an array of floats void lipSyncOohAah( F32& ooh, F32& aah ); +#ifdef XXX_STINSON_CHUI_REWORK void render(); // inherited from HUD Effect void packData(LLMessageSystem *mesgsys); // inherited from HUD Effect void unpackData(LLMessageSystem *mesgsys, S32 blocknum); // inherited from HUD Effect @@ -103,12 +118,17 @@ class LLVoiceVisualizer : public LLHUDEffect //---------------------------------------------------------------------------------------------- void setMaxGesticulationAmplitude(); void setMinGesticulationAmplitude(); +#endif // XXX_STINSON_CHUI_REWORK //--------------------------------------------------- // private members //--------------------------------------------------- private: - + static bool handleVoiceVisualizerPrefsChanged(const LLSD& newvalue); + static void setPreferences( ); + static void lipStringToF32s ( std::string& in_string, F32*& out_F32s, U32& count_F32s ); // convert a string of digits to an array of floats + +#ifdef XXX_STINSON_CHUI_REWORK struct SoundSymbol { F32 mWaveExpansion [ NUM_VOICE_SYMBOL_WAVES ]; @@ -119,15 +139,20 @@ class LLVoiceVisualizer : public LLHUDEffect bool mActive; LLVector3 mPosition; }; +#endif // XXX_STINSON_CHUI_REWORK LLFrameTimer mTimer; // so I can ask the current time in seconds F64 mStartTime; // time in seconds when speaking started +#ifdef XXX_STINSON_CHUI_REWORK F64 mCurrentTime; // current time in seconds, captured every step F64 mPreviousTime; // copy of "current time" from last frame SoundSymbol mSoundSymbol; // the sound symbol that appears over the avatar's head bool mVoiceEnabled; // if off, no rendering should happen +#endif // XXX_STINSON_CHUI_REWORK bool mCurrentlySpeaking; // is the user currently speaking? +#ifdef XXX_STINSON_CHUI_REWORK LLVector3 mVoiceSourceWorldPosition; // give this to me every step - I need it to update the sound symbol +#endif // XXX_STINSON_CHUI_REWORK F32 mSpeakingAmplitude; // this should be set as often as possible when the user is speaking F32 mMaxGesticulationAmplitude; // this is the upper-limit of the envelope of detectable gesticulation leves F32 mMinGesticulationAmplitude; // this is the lower-limit of the envelope of detectable gesticulation leves -- cgit v1.2.3 From ae2de6bdcfa5ed40f820652193753b29bceaef80 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Thu, 2 Aug 2012 18:38:38 -0700 Subject: Re-enabling the voice-dot until I have more time to invest in the new CHUI version. --- indra/newview/llvoicevisualizer.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llvoicevisualizer.h') diff --git a/indra/newview/llvoicevisualizer.h b/indra/newview/llvoicevisualizer.h index 6258de163d..5da592c48e 100644 --- a/indra/newview/llvoicevisualizer.h +++ b/indra/newview/llvoicevisualizer.h @@ -42,6 +42,7 @@ #ifndef LL_VOICE_VISUALIZER_H #define LL_VOICE_VISUALIZER_H +#define XXX_STINSON_CHUI_REWORK // temporarily re-enabling the in-world voice-dot #ifdef XXX_STINSON_CHUI_REWORK #include "llhudeffect.h" #else // XXX_STINSON_CHUI_REWORK -- cgit v1.2.3 From b4d4fc902ba4d289326c6839e8a2a3e4fb1630e9 Mon Sep 17 00:00:00 2001 From: William Todd Stinson Date: Mon, 17 Dec 2012 15:06:38 -0800 Subject: CHUI-115: Removing code that is ifdef'ed out. --- indra/newview/llvoicevisualizer.h | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'indra/newview/llvoicevisualizer.h') diff --git a/indra/newview/llvoicevisualizer.h b/indra/newview/llvoicevisualizer.h index 5da592c48e..36c78252d1 100644 --- a/indra/newview/llvoicevisualizer.h +++ b/indra/newview/llvoicevisualizer.h @@ -42,12 +42,7 @@ #ifndef LL_VOICE_VISUALIZER_H #define LL_VOICE_VISUALIZER_H -#define XXX_STINSON_CHUI_REWORK // temporarily re-enabling the in-world voice-dot -#ifdef XXX_STINSON_CHUI_REWORK #include "llhudeffect.h" -#else // XXX_STINSON_CHUI_REWORK -#include "llpointer.h" -#endif // XXX_STINSON_CHUI_REWORK //----------------------------------------------------------------------------------------------- // The values of voice gesticulation represent energy levels for avatar animation, based on @@ -65,45 +60,30 @@ enum VoiceGesticulationLevel NUM_VOICE_GESTICULATION_LEVELS }; -#ifdef XXX_STINSON_CHUI_REWORK const static int NUM_VOICE_SYMBOL_WAVES = 7; -#endif // XXX_STINSON_CHUI_REWORK //---------------------------------------------------- // LLVoiceVisualizer class //---------------------------------------------------- -#ifdef XXX_STINSON_CHUI_REWORK class LLVoiceVisualizer : public LLHUDEffect -#else // XXX_STINSON_CHUI_REWORK -class LLVoiceVisualizer : public LLRefCount -#endif // XXX_STINSON_CHUI_REWORK { //--------------------------------------------------- // public methods //--------------------------------------------------- public: -#ifdef XXX_STINSON_CHUI_REWORK LLVoiceVisualizer( const U8 type ); //constructor -#else // XXX_STINSON_CHUI_REWORK - LLVoiceVisualizer(); //constructor -#endif // XXX_STINSON_CHUI_REWORK ~LLVoiceVisualizer(); //destructor -#ifdef XXX_STINSON_CHUI_REWORK void setVoiceSourceWorldPosition( const LLVector3 &p ); // this should be the position of the speaking avatar's head void setMinGesticulationAmplitude( F32 ); // the lower range of meaningful amplitude for setting gesticulation level void setMaxGesticulationAmplitude( F32 ); // the upper range of meaningful amplitude for setting gesticulation level -#endif // XXX_STINSON_CHUI_REWORK void setStartSpeaking(); // tell me when the av starts speaking -#ifdef XXX_STINSON_CHUI_REWORK void setVoiceEnabled( bool ); // tell me whether or not the user is voice enabled -#endif // XXX_STINSON_CHUI_REWORK void setSpeakingAmplitude( F32 ); // tell me how loud the av is speaking (ranges from 0 to 1) void setStopSpeaking(); // tell me when the av stops speaking bool getCurrentlySpeaking(); // the get for the above set VoiceGesticulationLevel getCurrentGesticulationLevel(); // based on voice amplitude, I'll give you the current "energy level" of avatar speech void lipSyncOohAah( F32& ooh, F32& aah ); -#ifdef XXX_STINSON_CHUI_REWORK void render(); // inherited from HUD Effect void packData(LLMessageSystem *mesgsys); // inherited from HUD Effect void unpackData(LLMessageSystem *mesgsys, S32 blocknum); // inherited from HUD Effect @@ -119,7 +99,6 @@ class LLVoiceVisualizer : public LLRefCount //---------------------------------------------------------------------------------------------- void setMaxGesticulationAmplitude(); void setMinGesticulationAmplitude(); -#endif // XXX_STINSON_CHUI_REWORK //--------------------------------------------------- // private members @@ -129,7 +108,6 @@ class LLVoiceVisualizer : public LLRefCount static void setPreferences( ); static void lipStringToF32s ( std::string& in_string, F32*& out_F32s, U32& count_F32s ); // convert a string of digits to an array of floats -#ifdef XXX_STINSON_CHUI_REWORK struct SoundSymbol { F32 mWaveExpansion [ NUM_VOICE_SYMBOL_WAVES ]; @@ -140,20 +118,15 @@ class LLVoiceVisualizer : public LLRefCount bool mActive; LLVector3 mPosition; }; -#endif // XXX_STINSON_CHUI_REWORK LLFrameTimer mTimer; // so I can ask the current time in seconds F64 mStartTime; // time in seconds when speaking started -#ifdef XXX_STINSON_CHUI_REWORK F64 mCurrentTime; // current time in seconds, captured every step F64 mPreviousTime; // copy of "current time" from last frame SoundSymbol mSoundSymbol; // the sound symbol that appears over the avatar's head bool mVoiceEnabled; // if off, no rendering should happen -#endif // XXX_STINSON_CHUI_REWORK bool mCurrentlySpeaking; // is the user currently speaking? -#ifdef XXX_STINSON_CHUI_REWORK LLVector3 mVoiceSourceWorldPosition; // give this to me every step - I need it to update the sound symbol -#endif // XXX_STINSON_CHUI_REWORK F32 mSpeakingAmplitude; // this should be set as often as possible when the user is speaking F32 mMaxGesticulationAmplitude; // this is the upper-limit of the envelope of detectable gesticulation leves F32 mMinGesticulationAmplitude; // this is the lower-limit of the envelope of detectable gesticulation leves -- cgit v1.2.3