1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 14:37:30 +08:00

Fix old looping samples not stopping when replacing a SkinnableSound's Samples

Closes https://github.com/ppy/osu/issues/30365.
This commit is contained in:
Bartłomiej Dach 2024-10-22 14:30:29 +02:00
parent 53a340938a
commit 1008d32ddb
No known key found for this signature in database

View File

@ -154,6 +154,9 @@ namespace osu.Game.Skinning
{
bool wasPlaying = IsPlaying;
if (wasPlaying && Looping)
Stop();
// Remove all pooled samples (return them to the pool), and dispose the rest.
samplesContainer.RemoveAll(s => s.IsInPool, false);
samplesContainer.Clear();