mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 05:22:54 +08:00
Propagate samples to drum roll/swell ticks for correct playback
In d97daee96b
, `DrumSampleTriggerSource`
was changed such that in order to play sounds for the user's inputs, the
bank of the normal sound would always be used.
The problem is that in the case of taiko objects which have nested
objects (swells and drum rolls), the samples were not propagated fully
(drum rolls, where only the finish sample was kept, for the purposes of
determining strongability), or not propagated at all (swells) to ticks.
As ticks of both objects are valid return values of
`GetMostValidHitObject()`, this would lead to the drum making no sounds
if the next object was a drum roll or swell, until that drum roll or
swell was completed. To fix, propagate the full set of samples, so that
`DrumSampleTriggerSource` can retrieve the normal sound to copy the bank
from.
Note that this may not necessarily reproduce prior behaviour. This is
because it is not guaranteed that all realised samples for a given
hitobject have the same bank - some may have been overriden locally on a
given hitobject. Previously, the bank would have been retrieved from the
sample control point, wherein there is only one possible bank to use;
however, when deciding the sound to play on the basis of a constructed
hitobject, it is possible that there are cases wherein the hitnormal
sample was overridden on that given hitobject, and in such cases, this
PR would make samples _play_, but not necessarily the _same_ samples
as prior to #23308.
If that turns out to be the case, this will have to be revisited.
This commit is contained in:
parent
5229cf7343
commit
6d325651dc
@ -3,11 +3,9 @@
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System.Linq;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
using System.Threading;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Game.Audio;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Beatmaps.ControlPoints;
|
||||
using osu.Game.Beatmaps.Formats;
|
||||
@ -98,7 +96,7 @@ namespace osu.Game.Rulesets.Taiko.Objects
|
||||
TickSpacing = tickSpacing,
|
||||
StartTime = t,
|
||||
IsStrong = IsStrong,
|
||||
Samples = Samples.Where(s => s.Name == HitSampleInfo.HIT_FINISH).ToList()
|
||||
Samples = Samples
|
||||
});
|
||||
|
||||
first = false;
|
||||
|
@ -33,7 +33,10 @@ namespace osu.Game.Rulesets.Taiko.Objects
|
||||
for (int i = 0; i < RequiredHits; i++)
|
||||
{
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
AddNested(new SwellTick());
|
||||
AddNested(new SwellTick
|
||||
{
|
||||
Samples = Samples
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user