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:
Dean Herbert
2022-07-06 16:32:53 +09:00
parent 45c5b7e7dd
commit 7ef03dd2cb
2 changed files with 18 additions and 4 deletions

View File

@ -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;