The problem is gone if I drop the default-fragment-size-msec to 2, is it bad?
The problem is gone if I drop the
default-fragment-size-msecto 2, is it bad?
If you have any audio problems in the future then remember that you changed that. It could cause problems for people if the value was incorrect for the hardware and you put in a bug report about something having audio problems.
However, it looks like its also possible for the default value to incorrect at times so changing it for you could be correct but if you just plopped in any old number then its likely to be incorrect, yet if a number fixes it perhaps it could be correct.
Fun times for you.
This may not work everywhere but some games may be fixed by setting SDL_AUDIO_FREQUENCY to the system's sample rate. FAudio for example defaults to 48000 simply because we don't have a way of getting the device spec and it's the most common, but I can see how that would degrade when the two rates are vastly different.
This may not work everywhere but some games may be fixed by setting
SDL_AUDIO_FREQUENCYto the system's sample rate. FAudio for example defaults to 48000 simply because we don't have a way of getting the device spec and it's the most common, but I can see how that would degrade when the two rates are vastly different.
@flibitijibibo 48000 is not the most common sample rate linux systems install with, its 44100. Perhaps a setting could be added to steams compatibility settings tab(in steam settings) to define/override what sample rate games should output?
SDL_AUDIO_FREQUENCYx2 2024-05
Compatibility Report
System Information
I confirm:
Symptoms
There is a serious latency issue when the default output sample rate is higher than 48KHz, but the problem is gone if I have played other 96KHz music first, then there is no latency in game although the output format is resampled to 96KHz.
Reproduction
edid /etc/pulse/daemon.conf
edid
default-sample-rateto 96000pulseaudio --killpulseaudio --start