mirror of
https://github.com/ppy/osu
synced 2025-03-20 18:08:25 +00:00
Ensure looping is disabled on old samples when switching skins
This commit is contained in:
parent
0e821e857e
commit
bf4317d3f0
@ -83,6 +83,14 @@ namespace osu.Game.Skinning
|
|||||||
|
|
||||||
bool wasPlaying = Playing;
|
bool wasPlaying = Playing;
|
||||||
|
|
||||||
|
if (activeChannel != null)
|
||||||
|
{
|
||||||
|
// when switching away from previous samples, we don't want to call Stop() on them as it sounds better to let them play out.
|
||||||
|
// this may change in the future if we use PoolableSkinSample in more locations than gameplay.
|
||||||
|
// we *do* want to turn off looping, else we end up with an infinite looping sample running in the background.
|
||||||
|
activeChannel.Looping = false;
|
||||||
|
}
|
||||||
|
|
||||||
sampleContainer.Clear();
|
sampleContainer.Clear();
|
||||||
Sample = null;
|
Sample = null;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user