forked from mumble-voip/mumble
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX(client,positional-audio): Allow positional volume of 0 in certain…
… circumstances This commit does 4 things to improve a minimum positional volume of 0: 1) It checks, if the user selected a minimum volume of 0 and, if the audio source is exceeding the maximum distance. When both are true, it hard-codes the sample volume to 0 irrespective of other settings. 2) It changes the minimum gain calculation to be 25% of the maximum positional volume (irrespective of listener direction). This will make sure that low volume situations will not be boosted by the arbitrary 1/20 minimum that was used before, while still making sure that both ears receive some sound in most cases. 3) It reduces the min volume clamping from 0.01 to 0.005. This is done because with a minimum volume of 0 a hard cut could be heard when using the new logic from 1). By reducing the minimal clamp, we reduce the volume difference between the last possible step and 0. The value 0.005 was found experimentally with the manual placement plugin, a maximum distance of 20, and a minimum volume of 0. 4) It sets the volume gain factor to 1, if the listener is (almost) inside an audio source.
- Loading branch information
Showing
1 changed file
with
42 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters