patrikzudel / PatrikZeros-CSGO-Sound-Fix

Program that lowers volume when aren't alive and get flashed in CS:GO. It aims to lower the chance of hearing damage by reducing overall sound exposure. Uses game state integration. Anti-cheat safe.
GNU General Public License v2.0
247 stars 19 forks source link

Advanced Sound Filtering #13

Open MSamman opened 2 years ago

MSamman commented 2 years ago

This is beyond what is currently being done, but I was thinking a potential direction for this project could be to use the game integration hooks to enable a band pass filter on the CS audio stream that can attenuate high frequencies. Another option to clip volumes that exceed a certain threshold altogether. I envision this is a lot more work, but wanted to bring it up as an idea.

Either way, this would entail a transformation on the actual audio stream. My VERY rudimentary research has put me onto using Windows Audio Processing Objects which I believe is something along the lines of what may be needed.

Wanted to bring up this idea and see what your thoughts are.

itouchdennis commented 2 years ago

Funny, I thought the same and commented on reddit yesterday: https://www.reddit.com/r/GlobalOffensive/comments/se7m45/comment/hwyghht/?utm_source=share&utm_medium=web2x&context=3

I guess if it's possible to inject a inverted audiofile while the original flashbang high frequency tone will be played, this would filter the entire sound off and everything else should be hearable.

if the soundfiles not matches the same volume, it will still reduce the volume of the sound (this could be an additional option in the settings.txt)

Just some thoughts, don't know how complicated this will be, or not.

MSamman commented 2 years ago

That is an interesting idea and would probably be easier to implement then what I had suggested.

itouchdennis commented 2 years ago

That's a "simple trick" in music / audio engineering to filter sounds. E.g. if you got a music track with vocals and the beat without vocals - and you want to have only the vocals as a single file, you could invert the beat without the vocals and play both tracks at the same time - you will only hear the difference between the to tracks, which are the vocals.

If same would be possible for the annoying tinitus triggering sounds in CS - this would be a huge thing