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 samples not being preloaded before gameplay starts #17244
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… never plays its own samples
The equality of samples is generally used to compare the sample equality, not its full properties. For instance, we don't compare `Volume` in the base implementation. Having `IsLayered` here breaks actual usages of equality, ie. for pooling purposes.
smoogipoo
previously approved these changes
Mar 14, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm. Tested on two beatmaps:
frenzibyte
reviewed
Mar 14, 2022
smoogipoo
approved these changes
Mar 14, 2022
frenzibyte
approved these changes
Mar 14, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Should reduce IO stutters during gameplay, especially on beatmaps with heavy custom hitsounding.
Closes #17241. Can be tested with the two provided beatmaps (which both have hundreds of hitsounds) by adding a breakpoint in
Playfield.prepareSamplePool
after entering gameplay (ie. afterPlayerLoader
finishes the load sequence).A few changes in this PR to make this work. Can be split out as dependencies but quite small and hopefully non-contentious:
6d6f73e Add overrides in
DrawableSliderTail
to explain/warn that this class never plays its own samplesNot strictly required to make this work, but is part of a flow I really could not understand while working through the tail sample playback logic. This makes things more explicit.
8676a25 Add the ability for
HitObject
s to specify auxiliary samplesUsed specifically for this optimisation, and nothing else (for now?).
4523393 Removes
IsLayered
fromLegacyHitSampleInfo
comparisonThe equality of samples is generally used to compare the sample equality, not its full properties. For instance, we don't compare
Volume
in the base implementation.Having
IsLayered
here breaks actual usages of equality, ie. for pooling purposes.39d95aa Adds automatic preloading of sample pools at a
Playfield
levelThis is the actual optimisation part of this PR.