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:
parent
b7ac779760
commit
482c23901b
@ -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();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user