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 AccuracyCircle sounds stopping when its ScorePanel is contracted #29215

Closed
wants to merge 8 commits into from

Conversation

Drison64
Copy link
Contributor

@Drison64 Drison64 commented Jul 31, 2024

osuresultscreensound.mp4

fixes #29207
depends on ppy/osu-framework#6359

@@ -100,6 +100,7 @@ public partial class ScorePanel : CompositeDrawable, IStateful<PanelState>
private AudioContainer audioContent = null!;

private bool displayWithFlair;
private readonly bool isNewLocalScore;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created this value due to displayWithFlair being set to false in updateState().

else
{
middleLayerContentContainer.Add(expandedPanelMiddleContent = middleLayerContent = new ExpandedPanelMiddleContent(Score, displayWithFlair) { Alpha = 0 });
if (expandedPanelMiddleContent != null) expandedPanelMiddleContent.AlwaysPresent = true;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get it. The AlwaysPresent set is presumably the fix here yes? Then what is going on with everything else in this diff?

Why does isNewLocalScore exist? What's with the random changes to hiding and showing the panel?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the original implementation, the top/middleLayerContent would expire upon changing the state. My implementation prevents middleLayerContent from being deleted if the ScorePanel's displayWithFlair is true, thus preventing the sound from stopping.

I removed isNewLocalScore and replaced all usages with displayWithFlair. Consequently, I also removed the line of code that was setting displayWithFlair since it is no longer used (it was previously used in constructing ExpandedPanelMiddleContent, which is now only constructed once and then shown/hidden).

Additionally, I added AlwaysPresent to the expandedPanelMiddleContent. Without this, when Alpha was 0, the sound would stop.

@bdach
Copy link
Collaborator

bdach commented Aug 7, 2024

So I spent a long time deciphering this fix, and I think I understand what it's trying to go for now. Unfortunately it is not enough. See video below.

2024-08-07.15-28-20.mp4

The video is a bit crap but the general scenario is to start clicking the collapsed panels on the left of the expanded one until the sound stops.

Undoubtedly something or other to do with the panel getting masked away or something.

Copy link
Collaborator

@bdach bdach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as above

@Drison64
Copy link
Contributor Author

Hi, just wanted to let you know I am still interested in working on this, my schedule is quite busy right now. I'll convert this to a draft for now.

@Drison64 Drison64 marked this pull request as draft August 19, 2024 07:36
@bdach
Copy link
Collaborator

bdach commented Aug 19, 2024

I'm confused, why did this get drafted? Is this PR in a complete state for a re-review right now or not?

@Drison64
Copy link
Contributor Author

Drison64 commented Aug 20, 2024

Hi, sorry for the confusion, this PR is not ready.

@peppy
Copy link
Member

peppy commented Sep 30, 2024

Going to close this one for now, please consider reopening if you want to take it on.

@peppy peppy closed this Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clicking off result panel stops skin's applause sound
3 participants