space-wizards / space-station-14

A multiplayer game about paranoia and chaos on a space station. Remake of the cult-classic Space Station 13.
https://spacestation14.io
MIT License
2.58k stars 3.2k forks source link

Audio attenuation should be stronger #5156

Open metalgearsloth opened 2 years ago

metalgearsloth commented 2 years ago

Seen a few complaints about this.

For light reading: https://indiegamedev.net/2020/04/12/the-complete-guide-to-openal-with-c-part-3-positioning-sounds/ https://hackage.haskell.org/package/OpenAL-1.7.0.5/docs/Sound-OpenAL-AL-Attenuation.html

Reference distance = minimum distance before gain applied max distance = where gain gets clamped (NOT where it stops playing) rollofffactor = curve

Essentially we want to set the rolloff factor higher, maybe 4 or so. We already use the default outside of ambience (InverseDistanceClamped) which is considered "the" one to use.

(the reason ambience uses linear is because I wanted the fade-in to be more controlled)

Currently the AudioParams default is on engine and content just calls engine stuff directly. For now you might want to just make a cvar in engine for rolloff factor and default it higher for now until we have a content audio system that just calls into the engine.

PaulRitter commented 2 years ago

i did fix positional audio for grid rotation, however i believe audio attenuation/occlusion is still broken with grid rotation. prob relevant

metalgearsloth commented 2 years ago

Also whenever this is changed speech sounds has a specific override for it so that probably needs fixing as well