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:
parent
e778c90930
commit
ec53d87c30
@ -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()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user