1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-26 23:22:55 +08:00

Fix potential race in looping sample

As mentioned via GitHub comments. Very unlikely for this to happen unless: the sample takes a short amount of time to load, is very short itself, and the update thread stalls until the sample fully completes.
This commit is contained in:
smoogipoo 2021-02-12 17:42:02 +09:00
parent d3f0c0730d
commit 0c3aef8645

View File

@ -115,8 +115,7 @@ namespace osu.Game.Skinning
if (Sample == null) if (Sample == null)
return; return;
activeChannel = Sample.Play(); activeChannel = Sample.Play(Looping);
activeChannel.Looping = Looping;
Played = true; Played = true;
} }