protonscr

Audio latency when the audio output samplerate is default to higher than 48 KHz.

protonopen
ValveSoftware/Proton#3574 · opened 2020-02-27 by laichiaheng · updated 2024-05-24 · 4 comments · github
Llaichiaheng 2020-02-27 github

Compatibility Report

  • Name of the game with compatibility issues: RESIDENT EVIL 2 / BIOHAZARD RE:2
  • Steam AppID of the game: 883710

System Information

I confirm:

  • [x] that I haven't found an existing compatibility report for this game.
  • [x] that I have checked whether there are updates for my system available.

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-rate to 96000
pulseaudio --kill
pulseaudio --start

Llaichiaheng 2020-02-27 github

The problem is gone if I drop the default-fragment-size-msec to 2, is it bad?

?ghost 2020-02-27 github

The problem is gone if I drop the default-fragment-size-msec to 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.

Fflibitijibibo 2020-02-27 github

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.

MmAd-DaWg 2024-05-24 github

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.

@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?

Launch options