mirror of
https://github.com/ppy/osu.git
synced 2024-11-07 13:07:25 +08:00
Merge pull request #21661 from nekodex/clamp-sfx-panning
Limit SFX panning on results screen
This commit is contained in:
commit
965be5123d
@ -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;
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user