1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 18:27:26 +08:00

Check RequestedPlaying state before allowing scheduled resume of looped sample

This commit is contained in:
Dean Herbert 2020-10-01 16:54:56 +09:00
parent b7ac779760
commit 482c23901b

View File

@ -41,8 +41,14 @@ namespace osu.Game.Skinning
// it's not easy to know if a sample has finished playing (to end).
// to keep things simple only resume playing looping samples.
else if (Looping)
{
// schedule so we don't start playing a sample which is no longer alive.
Schedule(base.Play);
Schedule(() =>
{
if (RequestedPlaying)
base.Play();
});
}
}
});
}