Modify slider function

This commit is contained in:
Zach Fox 2017-01-10 16:50:38 -08:00
parent 8bb200902f
commit dcff873cd4
2 changed files with 2 additions and 2 deletions

View file

@ -296,7 +296,7 @@ void AudioMixerSlave::addStreamToMix(AudioMixerClientData& listenerNodeData, con
float distance = glm::max(glm::length(relativePosition), EPSILON); float distance = glm::max(glm::length(relativePosition), EPSILON);
// figure out the gain for this source at the listener // 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 // figure out the azimuth to this source at the listener
float azimuth = isEcho ? 0.0f : azimuthForSource(listeningNodeStream, listeningNodeStream, relativePosition); float azimuth = isEcho ? 0.0f : azimuthForSource(listeningNodeStream, listeningNodeStream, relativePosition);

View file

@ -166,7 +166,7 @@ Row {
function updateGainFromQML(avatarUuid, gainValue) { function updateGainFromQML(avatarUuid, gainValue) {
var data = { var data = {
sessionId: avatarUuid, sessionId: avatarUuid,
gain: (Math.exp(gainValue) - 1) / (Math.E - 1) gain: (Math.pow(20, gainValue) - 1) / (20 - 1)
}; };
pal.sendToScript({method: 'updateGain', params: data}); pal.sendToScript({method: 'updateGain', params: data});
} }