mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 12:53:11 +08:00
Merge pull request #22535 from peppy/forcefully-stop-pause-sample
Ensure pause sample loop is stopped on exiting player
This commit is contained in:
commit
3ee771cbef
@ -44,6 +44,14 @@ namespace osu.Game.Screens.Play
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void StopAllSamples()
|
||||||
|
{
|
||||||
|
if (!IsLoaded)
|
||||||
|
return;
|
||||||
|
|
||||||
|
pauseLoop.Stop();
|
||||||
|
}
|
||||||
|
|
||||||
protected override void PopIn()
|
protected override void PopIn()
|
||||||
{
|
{
|
||||||
base.PopIn();
|
base.PopIn();
|
||||||
|
@ -1073,7 +1073,10 @@ namespace osu.Game.Screens.Play
|
|||||||
public override bool OnExiting(ScreenExitEvent e)
|
public override bool OnExiting(ScreenExitEvent e)
|
||||||
{
|
{
|
||||||
screenSuspension?.RemoveAndDisposeImmediately();
|
screenSuspension?.RemoveAndDisposeImmediately();
|
||||||
|
|
||||||
|
// Eagerly clean these up as disposal of child components is asynchronous and may leave sounds playing beyond user expectations.
|
||||||
failAnimationLayer?.Stop();
|
failAnimationLayer?.Stop();
|
||||||
|
PauseOverlay?.StopAllSamples();
|
||||||
|
|
||||||
if (LoadedBeatmapSuccessfully)
|
if (LoadedBeatmapSuccessfully)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user