From dcff873cd46d4747c53539a728c3717c774453fa Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Tue, 10 Jan 2017 16:50:38 -0800 Subject: [PATCH] Modify slider function --- assignment-client/src/audio/AudioMixerSlave.cpp | 2 +- interface/resources/qml/hifi/NameCard.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assignment-client/src/audio/AudioMixerSlave.cpp b/assignment-client/src/audio/AudioMixerSlave.cpp index 90037b7187..d502239341 100644 --- a/assignment-client/src/audio/AudioMixerSlave.cpp +++ b/assignment-client/src/audio/AudioMixerSlave.cpp @@ -296,7 +296,7 @@ void AudioMixerSlave::addStreamToMix(AudioMixerClientData& listenerNodeData, con float distance = glm::max(glm::length(relativePosition), EPSILON); // figure out the gain for this source at the listener - float gain = gainForSource(listeningNodeStream, streamToAdd, relativePosition, isEcho) + (perAvatarGain - 1.0f); + float gain = gainForSource(listeningNodeStream, streamToAdd, relativePosition, isEcho) * perAvatarGain; // figure out the azimuth to this source at the listener float azimuth = isEcho ? 0.0f : azimuthForSource(listeningNodeStream, listeningNodeStream, relativePosition); diff --git a/interface/resources/qml/hifi/NameCard.qml b/interface/resources/qml/hifi/NameCard.qml index 0a0b662193..18dbaf1fe1 100644 --- a/interface/resources/qml/hifi/NameCard.qml +++ b/interface/resources/qml/hifi/NameCard.qml @@ -166,7 +166,7 @@ Row { function updateGainFromQML(avatarUuid, gainValue) { var data = { sessionId: avatarUuid, - gain: (Math.exp(gainValue) - 1) / (Math.E - 1) + gain: (Math.pow(20, gainValue) - 1) / (20 - 1) }; pal.sendToScript({method: 'updateGain', params: data}); }