GTNewHorizons / Hodgepodge

A HodgePodge of patches
GNU Lesser General Public License v3.0
36 stars 57 forks source link

Fix sound imbalance #380

Closed Quarri6343 closed 3 months ago

Quarri6343 commented 3 months ago

I thought getNormalizedVolume only affects category volume, but it actually affects individual sound. So some sounds were affected by the new calculation twice, making them much quieter. This PR makes mixin only applies to set category volume. Hopefully it fixes https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/16442

Quarri6343 commented 3 months ago

This does jumpscare Nightly people if they set every volume to max because of this bug, but in every other cases it only makes sound quieter. I'm asking the person made this issue about the fix.

Caedis commented 3 months ago

Math.pow(x, 2) is quadratic as Raven said in the previous PR

Quarri6343 commented 3 months ago

Every source I search suggests that this is logarithmic volume control although I can't explain exact why. https://medium.com/zattoo_tech/logarithmic-volume-control-bd89cc1f2135 https://github.com/haasn/tdesktop/commit/87d5a23658d3e80b10f83b9b2fe22f573773a5d4

Quarri6343 commented 3 months ago

this actually fixes https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/16442 ready for review