mirror of
https://github.com/ppy/osu
synced 2025-01-25 07:13:22 +00:00
Merge pull request #30389 from bdach/fix-looping-samples-not-stopping
Fix old looping samples not stopping when replacing a `SkinnableSound`'s `Samples`
This commit is contained in:
commit
c1453cfd0c
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user