1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-18 10:53:21 +08:00

Avoid beatmap lookup per bar in logo visualisation

Just noticed in passing.
This commit is contained in:
Dean Herbert 2024-12-10 14:45:12 +09:00
parent 197d553238
commit d69f5fd4cf
No known key found for this signature in database

View File

@ -106,9 +106,12 @@ namespace osu.Game.Screens.Menu
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;
}