-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Don't change the playback pitch along the playback speed #29629
base: master
Are you sure you want to change the base?
Don't change the playback pitch along the playback speed #29629
Conversation
Please no more options... It's okay for the game to be opinionated, we don't need to cater to every user's personal preference. |
31002d8
to
d49cd71
Compare
Looks like HT(0.5) + 0.1 playback speed crashes the game with:
Given these two particular values, it's likely a rounding issue. However it's an issue that this can happen in any case. If we do want this PR, then it will also need a framework change to clamp the aggregate tempo. Perhaps a simple fix is: diff --git a/osu.Framework/Audio/AudioAdjustments.cs b/osu.Framework/Audio/AudioAdjustments.cs
index c7bca336b2..b5c59a2e84 100644
--- a/osu.Framework/Audio/AudioAdjustments.cs
+++ b/osu.Framework/Audio/AudioAdjustments.cs
@@ -140,11 +140,14 @@ private BindableNumber<double> getProperty(AdjustableProperty type)
{
switch (type)
{
- default:
- return (a, b) => a * b;
+ case AdjustableProperty.Tempo:
+ return (a, b) => Math.Clamp(a * b, 0.051, 49.9);
case AdjustableProperty.Balance:
return (a, b) => a + b;
+
+ default:
+ return (a, b) => a * b;
}
}
} There is a comment at the crashsite suggesting that we should somehow support tempo < 0.05, but I don't know if this is sane to do. |
Would it be better to just clamp the tempo bindable minValue (framework side)? like so:
|
No it would not be better. Whatever you're trying to do there does not look sane. The tempo on a singular component should not be clamped. The aggregate tempo should be. |
Solved: #29596
Drawback
The minimum playback speed is limited to 0.1x(rather than 0.05). This is because of the BASS library doesn't support the tempo that's equal to or less than 0.5