-
Notifications
You must be signed in to change notification settings - Fork 53
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
Add "Sound Quality" inside the options menu. #314
Conversation
I recommend removing the cvar and the low-pass (or at least make it optional behind another
|
Right now we have the situation that sndspeed is removed, but defaults to 11025 while snd_mixspeed is 44100. I believe that means the low-pass filter is applied by default and the only way to change it is to put sndspeed 44100 into autoexec.cfg or change it manually in the console. That's not ideal. |
That is exactly the main point. Why is that low pass filter on in the first place?. My guess is performace reasons for older sound cards or something like that (having less sample points being played is more efficient than having quadruple the sample rate), but it's completely useless nowadays, since the original quake PAK has all their sound already capped at 11025 Hz. Right now I don't have enough time to make those changes, but I will just delete the sndspeed option. |
It's definitely a problem for people who are using the Remaster files which are all 44 kHz. At this point people should rather have to change a variable if they are still using the old paks from the DOS release. |
The low-pass filter is to remove high-frequency noise introduced by resampling; the cutoff is set just below the Nyquist frequency for an 11025 Hz sample rate (half the frequency). The specific values for sound "quality" (corresponds to block size for resampling) and cutoff ratio were chosen originally by @ericwa to mimic the audio for resampling for Mac and Windows, though that has been changed to default to the Windows default (snd_quality = 5). Without a low-pass filter, 11025 Hz sounds sound very crunchy when resampled to 44100 Hz. My own personal preference is to have the filter cutoff at a point slightly higher than the Nyquist frequency, because I believe there's significant signal at that frequency. |
But if the samples are at 44kHz, it would make sense to set sndspeed to 44100 as well, wouldn't it? |
Okay, maybe I think this boils down to two options. Either: A) Completely discard sndspeed cvar and just automatically switch to 44100Hz when the user selects the "remaster" version and apply the filter when it's on the original version, removing completely the sndspeed option. We could just discard everything, but I think this should be at least explained or something, because someone would just wonder why this engine sounds worse than the KEX engine version for some reason. Edit: Recently recompiled the proyect from the andrei-drexler:master branch and saw the complete overhaul of game options. Maybe we could add a "sound filter (retro/off)" options here and keep sndspeed variable?: |
In a branch I have rewritten the entire mixer to work with floating point only and let the SDL handle the resampling. |
This add a "Sound Quality" option that lets the user change between original quality and remastered quality setting by chnaging the
sndspeed
cvar. This solves #169Also I think it's okay to add a third option named "Custom" if the user adds another value to
sndspeed
directy to the console, or maybe think about other options. Having a quick look to the code it seems it only checks if the value is 11025 or not, so it shouldn't really matter.Maybe this is not a necessary change. I think it's a good QoL if I want to choose the KexQuake sound quality instead of the old one, but I leave this up to the maintainers.
Maybe it's good to add a "lock" option when the game is set to original, since this option is useless in this scenario. We should not lock sndspeed though because of mod support.