osu/osu.Game
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
..
Audio Fix argon volume-aware hitsounds not correctly playing immediately after object placement 2024-09-23 13:38:26 +02:00
Beatmaps Backpopulate missing ranked/submitted dates using new local metadata cache 2024-09-13 16:00:49 +02:00
Collections
Configuration fix config mistake 2024-09-04 03:37:52 -04:00
Database Change log output to only output when matches are found (in line with other methods) 2024-09-14 02:19:52 +09:00
Extensions
Graphics Merge pull request #29897 from bdach/editor/setup-screen-slider 2024-09-19 19:07:14 +09:00
IO
IPC
Input
Localisation
Models
Online Trigger request failure on receiving a null response for a typed `APIRequest` 2024-09-05 01:00:23 +09:00
Overlays Merge branch 'master' into grids-3 2024-09-19 18:21:05 +09:00
Performance
Properties
Replays
Rulesets Fix replay analysis overlay not rotating with Barrel Roll enabled 2024-09-11 15:54:30 +02:00
Scoring
Screens Merge pull request #29925 from nekupaw/skip-overlay-beat-synced-animation 2024-09-19 18:53:45 +09:00
Skinning Revert default combo counter code to pre-abstractification (and nuke eldritch abstract entity) 2024-09-11 11:44:59 +02:00
Storyboards
Tests
Updater
Users
Utils Merge branch 'master' into grids-3 2024-09-19 18:21:05 +09:00
.editorconfig
FodyWeavers.xml
OsuGame.cs
OsuGameBase.cs
OsuGameBase_Importing.cs
PerformFromMenuRunner.cs
osu!.res
osu.Game.csproj Update framework 2024-09-16 16:15:09 +09:00