Skip to content

Commit

Permalink
Merge pull request ppy#31047 from peppy/silly-thing
Browse files Browse the repository at this point in the history
Avoid beatmap lookup per bar in logo visualisation
  • Loading branch information
frenzibyte authored Dec 10, 2024
2 parents 48bf2fa + e6e79cb commit d8e545e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion osu.Game/Screens/Menu/LogoVisualisation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,12 @@ private void updateAmplitudes()
foreach (var source in amplitudeSources)
addAmplitudesFromSource(source);

float kiaiMultiplier = beatSyncProvider.CheckIsKiaiTime() ? 1 : 0.5f;

for (int i = 0; i < bars_per_visualiser; i++)
{
float targetAmplitude = (temporalAmplitudes[(i + indexOffset) % bars_per_visualiser]) * (beatSyncProvider.CheckIsKiaiTime() ? 1 : 0.5f);
float targetAmplitude = (temporalAmplitudes[(i + indexOffset) % bars_per_visualiser]) * kiaiMultiplier;

if (targetAmplitude > frequencyAmplitudes[i])
frequencyAmplitudes[i] = targetAmplitude;
}
Expand Down

0 comments on commit d8e545e

Please sign in to comment.