mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 10:49:33 +02:00
Modify slider function
This commit is contained in:
parent
8bb200902f
commit
dcff873cd4
2 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||||
|
|
|
@ -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});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue