1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-25 21:21:42 +08:00

Adjust to 200 ms debounce

This [matches
stable](https://github.com/peppy/osu-stable-reference/blob/52f3f75ed7efd7b9eb56e1e45c95bb91504337be/osu!/Audio/AudioEngine.cs#L1295)
and feels somewhat better.
This commit is contained in:
Dean Herbert
2025-11-21 16:56:58 +09:00
Unverified
parent 6052ed790d
commit 13dab24d41
2 changed files with 5 additions and 2 deletions
+3 -1
View File
@@ -29,6 +29,8 @@ namespace osu.Game.Overlays
{
public partial class NowPlayingOverlay : OsuFocusedOverlayContainer, INamedOverlayComponent
{
public const double TRACK_DRAG_SEEK_DEBOUNCE = 200;
public IconUsage Icon => OsuIcon.Music;
public LocalisableString Title => NowPlayingStrings.HeaderTitle;
public LocalisableString Description => NowPlayingStrings.HeaderDescription;
@@ -226,7 +228,7 @@ namespace osu.Game.Overlays
private void onSeek(double progress)
{
if (lastSeekTime == null || Time.Current - lastSeekTime > 500)
if (lastSeekTime == null || Time.Current - lastSeekTime > TRACK_DRAG_SEEK_DEBOUNCE)
{
musicController.SeekTo(progress);
lastSeekTime = Time.Current;
@@ -5,6 +5,7 @@ using System;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Input.Events;
using osu.Game.Overlays;
using osu.Game.Screens.Edit.Compose.Components.Timeline;
using osuTK;
@@ -66,7 +67,7 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
double seekDestination = markerPos / DrawWidth * editorClock.TrackLength;
marker.X = (float)seekDestination;
if (!instant && lastSeekTime != null && Time.Current - lastSeekTime < 500)
if (!instant && lastSeekTime != null && Time.Current - lastSeekTime < NowPlayingOverlay.TRACK_DRAG_SEEK_DEBOUNCE)
return;
editorClock.SeekSmoothlyTo(seekDestination);