mirror of
https://github.com/ppy/osu
synced 2025-01-06 14:20:03 +00:00
Merge pull request #260 from Tom94/audio-on-song-select
Don't async/await song selection since audio operations are now on a …
This commit is contained in:
commit
5060eeeb7f
@ -1 +1 @@
|
|||||||
Subproject commit f8899f9d1043ed74481eba2d9bf89c3c5ee38ddf
|
Subproject commit 45bff5838d133d918547e90bd74c9d0d5fadecc1
|
@ -317,22 +317,17 @@ namespace osu.Game.Screens.Select
|
|||||||
ensurePlayingSelected(beatmapSetChange);
|
ensurePlayingSelected(beatmapSetChange);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task ensurePlayingSelected(bool preview = false)
|
private void ensurePlayingSelected(bool preview = false)
|
||||||
{
|
{
|
||||||
AudioTrack track = null;
|
AudioTrack track = Beatmap?.Track;
|
||||||
|
|
||||||
await Task.Run(() => track = Beatmap?.Track);
|
if (track != null)
|
||||||
|
|
||||||
Schedule(delegate
|
|
||||||
{
|
{
|
||||||
if (track != null)
|
trackManager.SetExclusive(track);
|
||||||
{
|
if (preview)
|
||||||
trackManager.SetExclusive(track);
|
track.Seek(Beatmap.Beatmap.Metadata.PreviewTime);
|
||||||
if (preview)
|
track.Start();
|
||||||
track.Seek(Beatmap.Beatmap.Metadata.PreviewTime);
|
}
|
||||||
track.Start();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addBeatmapSet(BeatmapSetInfo beatmapSet, BaseGame game)
|
private void addBeatmapSet(BeatmapSetInfo beatmapSet, BaseGame game)
|
||||||
|
Loading…
Reference in New Issue
Block a user