Add positional sound support for all rulesets

The SamplePlaybackBalance is calculated in a way that the balance
remains between -0.4 and 0.4.
Positional sound is not supported in osu!taiko.
This commit is contained in:
Fire937
2020-04-12 01:33:25 +02:00
parent c17e470266
commit f274ec297c
4 changed files with 28 additions and 18 deletions

View File

@ -16,6 +16,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
// Must be set to update IsHovered as it's used in relax mdo to detect osu hit objects.
public override bool HandlePositionalInput => true;
protected override float SamplePlaybackBalance => (HitObject.X / 512f - 0.5f) * 0.8f;
protected DrawableOsuHitObject(OsuHitObject hitObject)
: base(hitObject)
{