ppy / osu-stable-issues

Report critical osu-stable issues here
59 stars 11 forks source link

osu!stable std - Unlimited FPS - Audio Latency Issue #1174

Open Arizoka opened 8 months ago

Arizoka commented 8 months ago

Type

Performance

Bug description

Hello there,

I have been struggling with audio latency in osu!stable std for a couple of months now. The experience during gameplay is as follows: When I click on an object on time, whether it is a high sr map or a low sr map I hear the hit sound coming with delay (most frequently after my actual keypress). osu! is the only game where I'm experiencing this issue.

Please find below some specs and settings:

PC Specs:

CPU : Intel I5 12th gen 6 cores 4.5Ghz GPU : NVIDIA MSI RTX 3060 12GB RAM : Corsair 16GB 3200 Mhz SSD : 1TB Samsung 980Pro PCIE Gen 4

External Soundcard:

Model: Focusrite Solo Gen 2 Driver version: 4.116.9 Sample Rate : 48000 Buffer Size : 32 Round-Trip Latency: 5.5ms (262 Samples) Windows Exclusive mode: Disabled Nvidia GPU Audio: Disabled

osu! Settings:

All visual FX: Disabled Ratio: Full Screen HeightFullscreen = 1080 WidthFullscreen = 1920 MyPCSucks = 0 Skin Samples = 1 Audio Compatibility mode = 0 Frame sync = Unlimited

osu! Output:

Gameplay latency/fps counter: 0.2 to 0.3ms

Is there anything i can do to fix this?

So far I have tried :

Thank you in advance for your help

Screenshots or videos

No response

Version

b20231023.1cuttingedge

Logs

performance.log

bdach commented 8 months ago

https://github.com/ppy/osu-stable-issues/issues is the correct place for this

peppy commented 8 months ago

Have you tried using onboard sound?

Arizoka commented 8 months ago

I am using a high impedance headset (>200Ohms). It needs to go through an Amp first for it to have enough power to work.

Unfortunatly the only Digital Analog Converter I own is that audio USB interface.

I'll give it a try using some spare earbuds

ThePooN commented 8 months ago

Where is your "Round-Trip Latency" coming from? is that something you can measure with osu!?

Arizoka commented 8 months ago

Where is your "Round-Trip Latency" coming from? is that something you can measure with osu!?

It is automatically calculated by the Audio interface Driver as you can see below.

image

As of what peppy suggested, using earbuds on onboard audio output works fine.

I have tried tweaking a few settings yesterday with my audio driver and ingame settings (Changing Sample rate to 44100 and buffer size to 64 and 128.

It seems that the hitsounds sound a little bit closer to what I am expecting but with added latency overall in the game while Optimal refresh rate setting (980fps - 1.2 to 1.6ms) and 44100 Sample Rate with Buffer Size 32 and disabling Safe mode for Round-Trip Latency.

peppy commented 8 months ago

I'm not sure how the driver is discerning that 5.5ms, but if you can hear a difference then it's likely adding more than that.

Hard to really say anything further as it's going to be driver-level. Maybe double-check your windows settings to ensure you don't have any sound enhancements turned on. You could also try turning on compatibility mode in settings.

You should also test lazer to see if things work better there.

Arizoka commented 8 months ago

I can't find any documentation on the round-trip latency for this driver. But from my knowledge, since it is based on the same concept as ASIO, it must be an estimate of the combination of Sample Rate and Buffer Size. For the safe mode, it is a feature that adds 0.5 to 1ms to avoid any glitches or stutter in the audio output.

For Windows sound enhancements, Exclusive mode is disabled, same goes for spatial sound

image image

I ran a test with LatencyMon while using osu! for approximately 3-4 mins you can find the logs below.

LatencyMonStats.txt

I have tried compatibility mode before, that introduces image stutter, more input lag and it is a hard time to Alt-Tab with it as it gives you a black screen or doesn't wanna go back to the screen until I retry for multiple times, sometimes for a few minutes. (I have had this Alt-Tab issue on my laptop as well for the last 2 years).

I have tried lazer, no latency issue, running on unlimited settings, I even tap earlier than std because of stable latency affecting my muscle memory.

Arizoka commented 8 months ago

If that helps, here are my Nvidia Settings for osu! stable as well

image image image image

peppy commented 8 months ago

I have tried compatibility mode before, that introduces image stutter

Sorry, I meant audio compatibility mode in settings. It uses a different pathway for audio.

It's great to hear that lazer fixes the issue for you though.

Arizoka commented 8 months ago

I believe it produces the same effect where I have a little less latency issues but then image stutters with the audio trying to constantly sync with the image.

Once I am home, I'll give it a try again while using LatencyMon.

Arizoka commented 8 months ago

Update on the subject: As expected, Audio Compatibility mode fixes to issue to a certain extent (it's at least playable). But the screen stutter feels like playing on 30-60hz.

I am not sure if it something time be seen if I record some gameplay.

LatencyMon on it's side claims that the hardware is capable of real-time audio without dropouts. image