diff options
| author | Lynx Linden <lynx@lindenlab.com> | 2010-01-13 13:37:55 +0000 | 
|---|---|---|
| committer | Lynx Linden <lynx@lindenlab.com> | 2010-01-13 13:37:55 +0000 | 
| commit | dadca1e1b993208ac1092c28083bcfca10a6a72a (patch) | |
| tree | e8b6c729d93ec634678f51b5997c6f2e7171e527 /indra/newview | |
| parent | 3f07a635c877332ecd49efef4d83da1e856a4fc9 (diff) | |
EXT-3611: Corrected the volume squares in Sound Prefs.
You should now be able to light up the 5th square on the I/O sound
devices panel of the preferences floater.
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/llfloatervoicedevicesettings.cpp | 18 | 
1 files changed, 5 insertions, 13 deletions
| diff --git a/indra/newview/llfloatervoicedevicesettings.cpp b/indra/newview/llfloatervoicedevicesettings.cpp index 43024a4bd0..d3ef17d402 100644 --- a/indra/newview/llfloatervoicedevicesettings.cpp +++ b/indra/newview/llfloatervoicedevicesettings.cpp @@ -110,21 +110,13 @@ void LLPanelVoiceDeviceSettings::draw()  	LLPanel::draw(); -	F32 voice_power = gVoiceClient->tuningGetEnergy(); -	S32 discrete_power = 0; - -	if (!is_in_tuning_mode) -	{ -		discrete_power = 0; -	} -	else -	{ -		discrete_power = llmin(4, llfloor((voice_power / LLVoiceClient::OVERDRIVEN_POWER_LEVEL) * 4.f)); -	} -	  	if (is_in_tuning_mode)  	{ -		for(S32 power_bar_idx = 0; power_bar_idx < 5; power_bar_idx++) +		const S32 num_bars = 5; +		F32 voice_power = gVoiceClient->tuningGetEnergy() / LLVoiceClient::OVERDRIVEN_POWER_LEVEL; +		S32 discrete_power = llmin(num_bars, llfloor(voice_power * (F32)num_bars + 0.1f)); + +		for(S32 power_bar_idx = 0; power_bar_idx < num_bars; power_bar_idx++)  		{  			std::string view_name = llformat("%s%d", "bar", power_bar_idx);  			LLView* bar_view = getChild<LLView>(view_name); | 
