mirror of
https://github.com/ppy/osu.git
synced 2026-05-19 16:20:14 +08:00
Second pass audio transition changes (#37107)
Let's try and find a sweet spot somewhere between lazer and stable that
we can all be happy with 🙃.
This commit is contained in:
committed by
GitHub
Unverified
parent
dca9396f90
commit
2b587c8a0a
@@ -134,7 +134,7 @@ namespace osu.Game.Beatmaps
|
||||
if (Track.RestartPoint < 0 || Track.RestartPoint > Track.Length)
|
||||
Track.RestartPoint = 0.4f * Track.Length;
|
||||
|
||||
offsetFromPreviewPoint ??= -MusicController.TRACK_FADE_IN_TIME;
|
||||
offsetFromPreviewPoint ??= -MusicController.DELAY_BEFORE_FADE;
|
||||
|
||||
Track.RestartPoint = Math.Clamp(Track.RestartPoint + offsetFromPreviewPoint.Value, 0, Track.Length);
|
||||
}
|
||||
|
||||
@@ -37,8 +37,7 @@ namespace osu.Game.Overlays
|
||||
/// </summary>
|
||||
private const double restart_cutoff_point = 5000;
|
||||
|
||||
public const double TRACK_FADE_IN_TIME = 250;
|
||||
public const double TRACK_FADE_OUT_TIME = 100;
|
||||
public const double DELAY_BEFORE_FADE = 30;
|
||||
|
||||
/// <summary>
|
||||
/// Whether the user has requested the track to be paused. Use <see cref="IsPlaying"/> to determine whether the track is still playing.
|
||||
@@ -514,6 +513,9 @@ namespace osu.Game.Overlays
|
||||
|
||||
private void changeTrack()
|
||||
{
|
||||
const double track_fade_in_time = 220;
|
||||
const double track_fade_out_time = 150;
|
||||
|
||||
var queuedTrack = getQueuedTrack();
|
||||
|
||||
var lastTrack = CurrentTrack;
|
||||
@@ -521,13 +523,13 @@ namespace osu.Game.Overlays
|
||||
|
||||
CurrentTrack = queuedTrack;
|
||||
|
||||
lastTrack.VolumeTo(0, TRACK_FADE_OUT_TIME, Easing.Out).Expire();
|
||||
lastTrack.VolumeTo(0, track_fade_out_time, Easing.Out).Expire();
|
||||
|
||||
if (queuedTrack == CurrentTrack)
|
||||
{
|
||||
queuedTrack.Volume.Value = 0;
|
||||
AddInternal(queuedTrack);
|
||||
queuedTrack.Delay(50).VolumeTo(1, TRACK_FADE_IN_TIME, Easing.Out);
|
||||
queuedTrack.Delay(DELAY_BEFORE_FADE).VolumeTo(1, track_fade_in_time);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -136,7 +136,7 @@ namespace osu.Game.Screens.Play
|
||||
Anchor = Anchor.TopCentre,
|
||||
CornerRadius = 10,
|
||||
Masking = true,
|
||||
Children = new Drawable[]
|
||||
Children = new[]
|
||||
{
|
||||
new Sprite
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user