Open shoober420 opened 6 years ago
This is pretty comical, all the voice chat is squeaky lolol
This is a common thing if you playback music for example, and it’s a different sample rate then what it’s supposed to be. The music will play faster then normal. Same thing is happening for in game sounds, since the 22khz audio files are being played back at 44khz without any resampling. Voice chat is also 22khz if I remember correctly, hence why it’s squeaky too.
The behavior before the SDL resample mixer update, was there would be no sound at all, since they stayed at 22khz. Now the 22khz files are being played at 44khz because of the SDL resample mixer lolol
As mentioned in this issue I made (https://github.com/ValveSoftware/halflife/issues/2709), to remedy this problem, GoldSrc should add the sndspeed and snd_mixspeed options from quakespasm for resampling purposes. This avoids having to depend on ALSA resampling, and can give a range of choices. From keeping true default 22kHz playback as GoldSrc intends, to upsampling to 44.1kHz to ensure compatibility with certain sound cards.
Heres another issue that mentions this problem.
NOTE: This is an extreme use case.
So recently, SDL was updated to include a mixer that will resample sounds. Back in like 2013, I remember I was trying to avoid resampling all together, becuase Im an audiophile, and SDL didnt have a resample mixer as of yet, and I asked that sounds not be resampled in GoldSrc games.
Because you guys are the best, you fulfilled my request, but little did I know my nice expensive Xonar Essence STX couldnt handle 22KHZ sample format, so no audio was played what so ever, and I had to enable resampling in ALSA to have sound play. Keep note of this audiophiles when you buy a new DAC if you so desire to playback 22KHZ without resampling.
I know quakespasm includes a mixer that will resample its original 22KHZ audio, so I can use the following ALSA script, and continue to have no resample system wide with the sounds playing back at the right pitch, but this also doesnt allow multiple sound sources to play. This is similar to WASAPI on Windows.
My "asound.conf" file in "/etc".
So I guess Im asking, could there be an option to enable and disable the mixer? If not, I guess just sample all audio to 44KHZ so I can continue to use the script? If not, I perfectly understand. Its all good.