mirror of
https://github.com/ppy/osu.git
synced 2025-02-08 01:33:15 +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).
|
// it's not easy to know if a sample has finished playing (to end).
|
||||||
// to keep things simple only resume playing looping samples.
|
// to keep things simple only resume playing looping samples.
|
||||||
else if (Looping)
|
else if (Looping)
|
||||||
|
{
|
||||||
// schedule so we don't start playing a sample which is no longer alive.
|
// 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