mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Changed shape of distance volume curve
This commit is contained in:
parent
065cdf3648
commit
58f114bba0
@ -80,7 +80,7 @@ export class AudioUnitPipeline {
|
||||
/* Don't bother updating parameters if the client is too far away */
|
||||
if (this.#distance < this.#maxDistance) {
|
||||
/* Compute a new gain decreasing with distance. */
|
||||
let newGain = 1.0 - Math.pow(this.#distance / this.#maxDistance, 2); // Arbitrary
|
||||
let newGain = 1.0 - Math.pow(this.#distance / this.#maxDistance, 1); // Arbitrary
|
||||
|
||||
/* Set the values of the main gain node and the multitap gain node, used for reverb effect */
|
||||
this.#gainNode.gain.setValueAtTime(newGain, getApp().getAudioManager().getAudioContext().currentTime);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user