1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 21:17:25 +08:00
osu-lazer/osu.Game.Rulesets.Taiko/Skinning/Argon
Bartłomiej Dach e8a394f894
Fix argon volume-aware hitsounds not correctly playing immediately after object placement
Closes https://github.com/ppy/osu/issues/29832.

The underlying reason for the incorrect sample playback was an equality
comparer failure.

Samples are contained in several pools which are managed by the
playfield. In particular, the pools are keyed by `ISampleInfo`
instances. This means that for correct operation, `ISampleInfo` has to
implement `IEquatable<ISampleInfo>` and also provide an appropriately
correct `GetHashCode()` implementation. Different audible samples must
not compare equal to each other when represented by `ISampleInfo`.

As it turns out, `VolumeAwareHitSampleInfo` failed on this, due to not
overriding equality members. Therefore, a `new
HitSampleInfo(HitSampleInfo.HIT_NORMAL, HitSampleInfo.BANK_NORMAL,
volume: 70)` was allowed to compare equal to a
`VolumeAwareHitSampleInfo` wrapping it, *even though they correspond to
completely different sounds and go through entirely different lookup
path sequences*.

Therefore, to fix, provide more proper equality implementations for
`VolumeAwareHitSampleInfo`.

When testing note that this issue *only occurs immediately after
placing an object*. Saving and re-entering editor makes this issue go
away. I haven't looked too long into why, but the general gist of it is
ordering; it appears that a `normal-hitnormal` pool exists at point
of query of a new object placement, but does not seem to exist when
entering editor afresh. That said I'm not sure that ordering aspect of
this bug matters much if at all, since the two `IHitSampleInfo`s should
never be allowed to alias with each other at all wrt equality.
2024-09-23 13:38:26 +02:00
..
ArgonBarLine.cs Apply same changes to "argon" osu!taiko barline design that were applied to osu!mania 2023-10-25 14:20:43 +09:00
ArgonCentreCirclePiece.cs Partial everything 2022-11-27 00:00:27 +09:00
ArgonCirclePiece.cs Rename variables to give more context 2023-06-12 14:18:26 +09:00
ArgonDrumSamplePlayer.cs Move flourish playback to own trigger source 2023-07-07 14:46:36 +09:00
ArgonDrumSampleTriggerSource.cs Move flourish playback to own trigger source 2023-07-07 14:46:36 +09:00
ArgonElongatedCirclePiece.cs Bypass Parent nullability checks for now 2023-10-17 17:48:45 +09:00
ArgonFlourishTriggerSource.cs Fix flourish sample not playing if strong hits are hit early 2023-07-08 19:22:32 +02:00
ArgonHitExplosion.cs Colour argon osu!taiko explosions based on the object hit 2023-06-06 15:49:03 +09:00
ArgonHitTarget.cs Partial everything 2022-11-27 00:00:27 +09:00
ArgonInputDrum.cs Define constant input drum width for osu!taiko 2024-01-20 01:46:15 +03:00
ArgonJudgementPiece.cs Rename JudgementPiece to TextJudgementPiece 2024-01-25 19:31:57 +09:00
ArgonPlayfieldBackgroundLeft.cs Partial everything 2022-11-27 00:00:27 +09:00
ArgonPlayfieldBackgroundRight.cs Partial everything 2022-11-27 00:00:27 +09:00
ArgonRimCirclePiece.cs Partial everything 2022-11-27 00:00:27 +09:00
ArgonSwellCirclePiece.cs Partial everything 2022-11-27 00:00:27 +09:00
ArgonTickPiece.cs Partial everything 2022-11-27 00:00:27 +09:00
RingPiece.cs Partial everything 2022-11-27 00:00:27 +09:00
TaikoArgonSkinTransformer.cs Rename GameplaySkinComponentLookup -> SkinComponentLookup 2024-08-22 18:46:03 +09:00
VolumeAwareHitSampleInfo.cs Fix argon volume-aware hitsounds not correctly playing immediately after object placement 2024-09-23 13:38:26 +02:00