mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 21:07:33 +08:00
Merge pull request #1717 from peppy/remove-unnecessary-blocking
Remove manual audio thread synchronisation logic
This commit is contained in:
commit
68035aa6a6
@ -13,7 +13,6 @@ using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using System.Threading;
|
||||
|
||||
namespace osu.Game.Overlays.Music
|
||||
{
|
||||
@ -153,11 +152,6 @@ namespace osu.Game.Overlays.Music
|
||||
var track = beatmapBacking.Value.Track;
|
||||
|
||||
track.Restart();
|
||||
|
||||
// this is temporary until we have blocking (async.Wait()) audio component methods.
|
||||
// then we can call RestartAsync().Wait() or the blocking version above.
|
||||
while (!track.IsRunning)
|
||||
Thread.Sleep(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,6 @@ using osu.Game.Rulesets.UI;
|
||||
using osu.Game.Screens.Backgrounds;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Framework.Threading;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
@ -327,11 +326,6 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
adjustableSourceClock.Reset();
|
||||
|
||||
// this is temporary until we have blocking (async.Wait()) audio component methods.
|
||||
// then we can call ResetAsync().Wait() or the blocking version above.
|
||||
while (adjustableSourceClock.IsRunning)
|
||||
Thread.Sleep(1);
|
||||
|
||||
Schedule(() =>
|
||||
{
|
||||
decoupledClock.ChangeSource(adjustableSourceClock);
|
||||
|
Loading…
Reference in New Issue
Block a user