mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 03:25:03 +08:00
Merge pull request #20025 from peppy/fix-results-sample-glitching
Fix audio glitching when showing results screen with many scores
This commit is contained in:
commit
1908a2e394
@ -99,7 +99,7 @@ namespace osu.Game.Screens.Ranking
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private OsuGameBase game { get; set; }
|
private OsuGameBase game { get; set; }
|
||||||
|
|
||||||
private DrawableAudioMixer mixer;
|
private AudioContainer audioContent;
|
||||||
|
|
||||||
private bool displayWithFlair;
|
private bool displayWithFlair;
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ namespace osu.Game.Screens.Ranking
|
|||||||
// Adding a manual offset here allows the expanded version to take on an "acceptable" vertical centre when at 100% UI scale.
|
// Adding a manual offset here allows the expanded version to take on an "acceptable" vertical centre when at 100% UI scale.
|
||||||
const float vertical_fudge = 20;
|
const float vertical_fudge = 20;
|
||||||
|
|
||||||
InternalChild = mixer = new DrawableAudioMixer
|
InternalChild = audioContent = new AudioContainer
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
@ -225,7 +225,7 @@ namespace osu.Game.Screens.Ranking
|
|||||||
protected override void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
mixer.Balance.Value = (ScreenSpaceDrawQuad.Centre.X / game.ScreenSpaceDrawQuad.Width) * 2 - 1;
|
audioContent.Balance.Value = (ScreenSpaceDrawQuad.Centre.X / game.ScreenSpaceDrawQuad.Width) * 2 - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void playAppearSample()
|
private void playAppearSample()
|
||||||
@ -274,7 +274,7 @@ namespace osu.Game.Screens.Ranking
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
mixer.ResizeTo(Size, RESIZE_DURATION, Easing.OutQuint);
|
audioContent.ResizeTo(Size, RESIZE_DURATION, Easing.OutQuint);
|
||||||
|
|
||||||
bool topLayerExpanded = topLayerContainer.Y < 0;
|
bool topLayerExpanded = topLayerContainer.Y < 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user