diff options
| author | Igor Borovkov <iborovkov@productengine.com> | 2009-12-14 17:11:15 +0200 |
|---|---|---|
| committer | Igor Borovkov <iborovkov@productengine.com> | 2009-12-14 17:11:15 +0200 |
| commit | c1b31cd97accfbd67f12ffbdff41f61ba9a01843 (patch) | |
| tree | e13a5e68523f6ee2889b8eaf81a8bdc81844a77a /indra/newview/llvoiceclient.cpp | |
| parent | 222dfaef0aa16ced2fd6285763467e5bfa8ed574 (diff) | |
| parent | c159d9165dda268f3d8d16e95dac81bc8a9e12be (diff) | |
merge
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llvoiceclient.cpp')
| -rw-r--r-- | indra/newview/llvoiceclient.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 7e1e7c940f..1889ca78c3 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -128,16 +128,8 @@ static int scale_mic_volume(float volume) static int scale_speaker_volume(float volume) { // incoming volume has the range [0.0 ... 1.0], with 0.5 as the default. - // Map it as follows: 0.0 -> 0, 0.5 -> 62, 1.0 -> 75 - - volume -= 0.5f; // offset volume to the range [-0.5 ... 0.5], with 0 at the default. - int scaled_volume = 62; // offset scaled_volume by its default level - if(volume < 0.0f) - scaled_volume += ((int)(volume * 124.0f)); // (62 - 0) * 2 - else - scaled_volume += ((int)(volume * 26.0f)); // (75 - 62) * 2 - - return scaled_volume; + // Map it as follows: 0.0 -> 0, 0.5 -> 50, 1.0 -> 100 + return (int)(volume * 100.0f); } class LLViewerVoiceAccountProvisionResponder : |
