Skip to content

Commit b926216

Browse files
committed
Second pass audio transition changes
Let's try and find a sweet spot somewhere between lazer and stable that we can all be happy with 🙃.
1 parent dca9396 commit b926216

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

osu.Game/Beatmaps/WorkingBeatmap.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public void PrepareTrackForPreview(bool looping, double? offsetFromPreviewPoint
134134
if (Track.RestartPoint < 0 || Track.RestartPoint > Track.Length)
135135
Track.RestartPoint = 0.4f * Track.Length;
136136

137-
offsetFromPreviewPoint ??= -MusicController.TRACK_FADE_IN_TIME;
137+
offsetFromPreviewPoint ??= -MusicController.DELAY_BEFORE_FADE;
138138

139139
Track.RestartPoint = Math.Clamp(Track.RestartPoint + offsetFromPreviewPoint.Value, 0, Track.Length);
140140
}

osu.Game/Overlays/MusicController.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ public partial class MusicController : CompositeDrawable
3737
/// </summary>
3838
private const double restart_cutoff_point = 5000;
3939

40-
public const double TRACK_FADE_IN_TIME = 250;
41-
public const double TRACK_FADE_OUT_TIME = 100;
40+
public const double DELAY_BEFORE_FADE = 30;
4241

4342
/// <summary>
4443
/// Whether the user has requested the track to be paused. Use <see cref="IsPlaying"/> to determine whether the track is still playing.
@@ -514,20 +513,23 @@ private void changeBeatmap(WorkingBeatmap newWorking)
514513

515514
private void changeTrack()
516515
{
516+
const double track_fade_in_time = 220;
517+
const double track_fade_out_time = 150;
518+
517519
var queuedTrack = getQueuedTrack();
518520

519521
var lastTrack = CurrentTrack;
520522
lastTrack.Completed -= onTrackCompleted;
521523

522524
CurrentTrack = queuedTrack;
523525

524-
lastTrack.VolumeTo(0, TRACK_FADE_OUT_TIME, Easing.Out).Expire();
526+
lastTrack.VolumeTo(0, track_fade_out_time, Easing.Out).Expire();
525527

526528
if (queuedTrack == CurrentTrack)
527529
{
528530
queuedTrack.Volume.Value = 0;
529531
AddInternal(queuedTrack);
530-
queuedTrack.Delay(50).VolumeTo(1, TRACK_FADE_IN_TIME, Easing.Out);
532+
queuedTrack.Delay(DELAY_BEFORE_FADE).VolumeTo(1, track_fade_in_time);
531533
}
532534
else
533535
{

osu.Game/Screens/Play/BeatmapMetadataDisplay.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ private void load(BeatmapDifficultyCache difficultyCache, OsuColour colours)
136136
Anchor = Anchor.TopCentre,
137137
CornerRadius = 10,
138138
Masking = true,
139-
Children = new Drawable[]
139+
Children = new[]
140140
{
141141
new Sprite
142142
{

0 commit comments

Comments
 (0)