1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:07:52 +08:00

Fix unsafe sample playback in GameplaySampleTriggerSource

Resolves https://github.com/ppy/osu/issues/18727.

Added delay from `Schedule` should be minimal as it is always called
from the `Update` thread (input propagation) anyway.
This commit is contained in:
Dean Herbert 2022-06-16 16:04:52 +09:00
parent e778c90930
commit ec53d87c30

View File

@ -56,12 +56,12 @@ namespace osu.Game.Rulesets.UI
PlaySamples(samples);
}
protected void PlaySamples(ISampleInfo[] samples)
protected void PlaySamples(ISampleInfo[] samples) => Schedule(() =>
{
var hitSound = getNextSample();
hitSound.Samples = samples;
hitSound.Play();
}
});
protected HitObject GetMostValidObject()
{