-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audio offset drift on some hardware configurations #31843
Comments
For anyone still encountering this issue From an admin command prompt:
Importantly, you should undo this once you're finished testing. It could have a permanent adverse effect on system performance:
Further reading: |
|
@peppy Correct me if I'm wrong, but to my limited understanding (from the little search I did on the topic), it seems the default value of |
Thanks, I've updated the documentation above. |
I've had this problem for a few years now and decided to deep dive into it the past week. I was able to fix it a different way today though: Using I tested reverting back to using I will continue testing different things on my end, looking into osu-framework, and looking into BASS in case there is a more specific reason that might allow a fix/option to be implemented within osu to limit the need for users to make changes on their end. Let me know if you'd like me to test anything else specific on my system @peppy . My specs:
Side note: I was able to quickly replicate the audio timing drift issue by spamming Pause and Resume over and over during a song intro, or a song break. You can make it worse and worse by restarting and doing it over and over again (up to the |
Thanks for your testing.
This sounds really weird. It shouldn't be doing anything that egregious. Could you test another time to confirm it was actually the issue, because it sounds like something else may have been at play..
Can you elaborate on this? Are you saying the maximum audio drift you can get is 32 ms? Once you get this drift, does it "stick" when starting playing on a different beatmap, or does it reset? |
Just tried again and it was the same case: I did dig into this a little bit last night and saw something about an HPET setting in the BIOS but I couldn't find it for mine. I'm wondering if HPET needs to be supported and enabled in the BIOS for the
|
Are you able to build the game and test locally yourself? If so, I'd ask that you test with different values for the Here's a diff to allow changing that setting without a local framework checkout: diff --git a/osu.Game/Beatmaps/FramedBeatmapClock.cs b/osu.Game/Beatmaps/FramedBeatmapClock.cs
index af7be235fc..168b360548 100644
--- a/osu.Game/Beatmaps/FramedBeatmapClock.cs
+++ b/osu.Game/Beatmaps/FramedBeatmapClock.cs
@@ -59,7 +59,7 @@ public FramedBeatmapClock(bool applyOffsets, bool requireDecoupling, IClock? sou
// An interpolating clock is used to ensure precise time values even when the host audio subsystem is not reporting
// high precision times (on windows there's generally only 5-10ms reporting intervals, as an example).
- interpolatedTrack = new InterpolatingFramedClock(decoupledTrack);
+ interpolatedTrack = new CustomInterpolatingFramedClock(decoupledTrack);
if (applyOffsets)
{
@@ -214,5 +214,15 @@ string output(IClock? clock)
return $"current: {clock.CurrentTime:N2} running: {clock.IsRunning} rate: {clock.Rate}";
}
}
+
+ public class CustomInterpolatingFramedClock : InterpolatingFramedClock
+ {
+ public override double AllowableErrorMilliseconds => 0;
+
+ public CustomInterpolatingFramedClock(DecouplingFramedClock decouplingFramedClock)
+ : base(decouplingFramedClock)
+ {
+ }
+ }
}
}
|
I've yet to test the My specs:
|
OK this is all so weird lol. I am able to build and test locally. I tried to replicate the issue again last night before running these tests, but failed to get any drift with (what I thought was) reinstalled High Definition drivers... Testing Again on
|
Great to hear it's not related to |
The drift doesn't seem to take place very quickly on my machine (e.g. leaving the game open overnight) so it's hard to test properly but I'm fairly certain it only happens on multithreaded mode.
|
This has been reported countless times but the history of these reports and potential solutions is a mess, so I'm opening a new tracking issue with everything we know.
Overview of issue:
Users are reporting offset drift that worsens over hours of gameplay. The drift is reset by restarting the game, or changing audio output devices.
Relevant issues:
Potential fixes:
Next steps:
Gather further feedback and report back to BASS, as this looks to be a BASS issue.
The text was updated successfully, but these errors were encountered: