mirror of
https://github.com/ppy/osu
synced 2025-02-16 10:07:11 +00: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:
parent
53a340938a
commit
1008d32ddb
@ -154,6 +154,9 @@ namespace osu.Game.Skinning
|
|||||||
{
|
{
|
||||||
bool wasPlaying = IsPlaying;
|
bool wasPlaying = IsPlaying;
|
||||||
|
|
||||||
|
if (wasPlaying && Looping)
|
||||||
|
Stop();
|
||||||
|
|
||||||
// Remove all pooled samples (return them to the pool), and dispose the rest.
|
// Remove all pooled samples (return them to the pool), and dispose the rest.
|
||||||
samplesContainer.RemoveAll(s => s.IsInPool, false);
|
samplesContainer.RemoveAll(s => s.IsInPool, false);
|
||||||
samplesContainer.Clear();
|
samplesContainer.Clear();
|
||||||
|
Loading…
Reference in New Issue
Block a user