mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Use fire-and-forget async operations on global track
This avoids any blocking overhead caused by a backlogged audio thread. Test seem to pass so might be okay? Note that order is still guaranteed due to the `ensureUpdateThread` queueing system framework-side.
This commit is contained in:
@ -430,11 +430,19 @@ namespace osu.Game.Tests.Visual
|
||||
return accumulated == seek;
|
||||
}
|
||||
|
||||
public override Task<bool> SeekAsync(double seek) => Task.FromResult(Seek(seek));
|
||||
|
||||
public override void Start()
|
||||
{
|
||||
running = true;
|
||||
}
|
||||
|
||||
public override Task StartAsync()
|
||||
{
|
||||
Start();
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
Seek(0);
|
||||
@ -450,6 +458,12 @@ namespace osu.Game.Tests.Visual
|
||||
}
|
||||
}
|
||||
|
||||
public override Task StopAsync()
|
||||
{
|
||||
Stop();
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public override bool IsRunning => running;
|
||||
|
||||
private double? lastReferenceTime;
|
||||
|
Reference in New Issue
Block a user