diff options
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 63acba50e7..aa69b46857 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 : |