Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix audio glitching when showing results screen with many scores #20025

Merged
merged 1 commit into from
Aug 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions osu.Game/Screens/Ranking/ScorePanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public class ScorePanel : CompositeDrawable, IStateful<PanelState>
[Resolved]
private OsuGameBase game { get; set; }

private DrawableAudioMixer mixer;
private AudioContainer audioContent;

private bool displayWithFlair;

Expand Down Expand Up @@ -130,7 +130,7 @@ private void load(AudioManager audio)
// 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;

InternalChild = mixer = new DrawableAudioMixer
InternalChild = audioContent = new AudioContainer
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Expand Down Expand Up @@ -225,7 +225,7 @@ public PanelState State
protected override void 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()
Expand Down Expand Up @@ -274,7 +274,7 @@ private void updateState()
break;
}

mixer.ResizeTo(Size, RESIZE_DURATION, Easing.OutQuint);
audioContent.ResizeTo(Size, RESIZE_DURATION, Easing.OutQuint);

bool topLayerExpanded = topLayerContainer.Y < 0;

Expand Down