mirror of https://github.com/ppy/osu
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:
parent
53a340938a
commit
1008d32ddb
|
@ -154,6 +154,9 @@ private void updateSamples()
|
|||
{
|
||||
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