1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 05:22:54 +08:00

Clamp SFX panning on results screen

This commit is contained in:
Jamie Taylor 2022-12-16 17:19:07 +09:00
parent cbee72897a
commit d5b2c7dfe9
No known key found for this signature in database
GPG Key ID: 2ACFA8B6370B8C8C
3 changed files with 4 additions and 2 deletions

View File

@ -234,7 +234,7 @@ namespace osu.Game.Graphics.Cursor
SampleChannel channel = tapSample.GetChannel();
// Scale to [-0.75, 0.75] so that the sample isn't fully panned left or right (sounds weird)
channel.Balance.Value = ((activeCursor.X / DrawWidth) * 2 - 1) * 0.75;
channel.Balance.Value = ((activeCursor.X / DrawWidth) * 2 - 1) * OsuGameBase.SFX_STEREO_STRENGTH;
channel.Frequency.Value = baseFrequency - (random_range / 2f) + RNG.NextDouble(random_range);
channel.Volume.Value = baseFrequency;

View File

@ -83,6 +83,8 @@ namespace osu.Game
public const int SAMPLE_CONCURRENCY = 6;
public const double SFX_STEREO_STRENGTH = 0.75;
/// <summary>
/// Length of debounce (in milliseconds) for commonly occuring sample playbacks that could stack.
/// </summary>

View File

@ -225,7 +225,7 @@ namespace osu.Game.Screens.Ranking
protected override void Update()
{
base.Update();
audioContent.Balance.Value = (ScreenSpaceDrawQuad.Centre.X / game.ScreenSpaceDrawQuad.Width) * 2 - 1;
audioContent.Balance.Value = ((ScreenSpaceDrawQuad.Centre.X / game.ScreenSpaceDrawQuad.Width) * 2 - 1) * OsuGameBase.SFX_STEREO_STRENGTH;
}
private void playAppearSample()