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

Remove ISample.Length #6399

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

peppy
Copy link
Member

@peppy peppy commented Oct 25, 2024

This has not been populated for a while and is not used osu! side. Rather than having an incorrectly zero value, let's remove it for now.

This has not been populated for a while and is not used osu! side.
Rather than having an incorrectly zero value, let's remove it for now.
@frenzibyte
Copy link
Member

There's technically one indirect usage of this osu!-side: https://github.com/ppy/osu/blob/ad2cd0ba8fb0b640155a704d2f39069eabec4985/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs#L488-L489

CleanShot 2024-10-26 at 13 56 47

As far as I understand, Length never mattered because the transform end time usually exceeds the length of the hit sample. I also thought the death of a DHO does not interrupt any played sample, deeming the above basically pointless, but turns out it does currently (see here). It's probably more ideal to remove that workaround and/or limit it to looping samples, since it would be a waste to prepare a new DHO just because the previous one is busy waiting for a sample to finish playing (especially since samples already have their own pool).

This is getting beyond the scope of this PR but I think it's worth mentioning anyway since we're removing ISample.Length now and the above intended to rely on it.

@smoogipoo
Copy link
Contributor

The above sounds very relevant, actually.

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.

3 participants