Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Glitching/clicking with rapid volume changes for positioned sounds with HRTF enabled (even when sliding) #59

Open
ns-studios opened this issue Jun 17, 2024 · 1 comment

Comments

@ns-studios
Copy link

ns-studios commented Jun 17, 2024

I ran into an issue where rapid volume changes, e.g., fading out, result in really unpleasant-sounding glitches/clicks/buffering for positioned (not at listener's position) sounds when HRTF is enabled, even when using sliding.
The rapid changes are especially unpleasant, but there are also clicks for changing volume abruptly, e.g., muting and unmuting a sound creates extra clicks with HRTF on, as well as certain sounds like camera air sound that aren't faded extremely well at the end generate a click where one isn't present without HRTF (usually the farther sound is positioned to the right, the click from it seems to move farther and farther to the left on the opposite side of the listener, and vice versa).
The clicks don't happen if HRTF is enabled and the sound is at listener's position, or HRTF is turned off.
The only way I've found to get clean-sounding fades is to use mixer.set_fx with the linear volume effect.
Attached is an example script that plays tada.wav from windows media folder, and fades it out first with sliding, then second without sliding, i.e., just sound.volume, and third/last uses mixer.set_fx.
Also attached is audio demo of me running this script.
clicks.zip
Forgot to demo mixer.slide_volume in the script, but that also glitches.

@valiant8086
Copy link
Contributor

I can reproduce this using the sample nvgt. On my system the first two tests chatter and the last one is smooth. They're making noises (pun intended) about switching the sound engine to miniaudio or some such so maybe that'll be a fix anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants