ppy / osu

rhythm is just a *click* away!
https://osu.ppy.sh
MIT License
15.32k stars 2.28k forks source link

Editor metronome plays late #23393

Closed ghost closed 1 year ago

ghost commented 1 year ago

Type

Game behaviour

Bug description

With this beatmap ARForest _ nayuta - Imaginary Arcadia (noneistaken).zip (please rename to .osz extension!) in the editor, the metronome ticks around 20ms to 30ms late.

Some notes:

2023-05-04_02-21

System info: I am on Artix Linux, using JACK audio output at 48000Hz, two channels, 256 samples/period. I explicitly set the audio output in osu!lazer to "JACK Audio Connection Kit" and verified that game audio was actually going through JACK.

Screenshots or videos

https://files.catbox.moe/8445uc.mp4 (around 65.2MiB, GitHub does not allow files over 10MB)

Version

2023.419.0.0

Logs

database.log input.log network.log performance.log runtime.log

ghost commented 1 year ago

Related:

ghost commented 1 year ago

I compiled osu and osu-framework with BASS's AsyncFile flag removed from all platforms and this still persists it seems.

peppy commented 1 year ago

You can adjust your universal offset in settings to fix this, game-wide.

It's due to per-system latency differences in audio playback.

ghost commented 1 year ago

due to per-system latency differences

Is it? Changing the period size or using a different audio output (like PulseAudio) does not make this latency higher or lower. I thought this delay would be mitigated in something like a metronone already.

adjust your universal offset

This works but it also makes the editor metronome and hitsounds in beatmaps from osu!stable sound too early, which makes sense because they are always timed around 20ms early.

peppy commented 1 year ago

Period doesn't affect sample playback latency.

Also if it's any consolation, I am looking into issues with the platform offsets currently (specifically that it seems incorrect on non-windows platforms), so please wait until I finish work on that before opening issues regarding timing. You can track this at https://github.com/ppy/osu/issues/21947.

ghost commented 1 year ago

Alright, much thanks.