Skip to content

Commit

Permalink
Merge pull request #1284 from andy840119/fix-lyric-playback-issue
Browse files Browse the repository at this point in the history
Fix lyric playback issue.
  • Loading branch information
andy840119 authored Apr 23, 2022
2 parents 14b70de + 49eaf21 commit 2b7b6f1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ static FontUsage getFont(float? charSize = null)
}, true);
}

public override bool RemoveCompletedTransforms => false;

public class EditorLyricSpriteText : LyricSpriteText
{
public RectangleF GetRubyTagPosition(RubyTag rubyTag)
Expand Down
19 changes: 12 additions & 7 deletions osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableLyric.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using osu.Game.Rulesets.Karaoke.Scoring;
using osu.Game.Rulesets.Karaoke.Skinning.Default;
using osu.Game.Rulesets.Karaoke.Skinning.Elements;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Skinning;
using osuTK;

Expand Down Expand Up @@ -220,15 +221,19 @@ protected override void CheckForResult(bool userTriggered, double timeOffset)
}
}

protected override void UpdateStartTimeStateTransforms()
protected override void UpdateInitialTransforms()
{
base.UpdateStartTimeStateTransforms();
base.UpdateInitialTransforms();

using (BeginDelayedSequence(HitObject.Duration))
{
const float fade_out_time = 500;
this.FadeOut(fade_out_time);
}
lyricPieces.ForEach(x => x.RefreshStateTransforms());
}

protected override void UpdateHitStateTransforms(ArmedState state)
{
base.UpdateHitStateTransforms(state);

const float fade_out_time = 500;
this.FadeOut(fade_out_time);
}

public void ApplyToLyricPieces(Action<DefaultLyricPiece> action)
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<PackageReference Include="ILRepack.Lib.MSBuild" Version="2.1.18" />
<PackageReference Include="LanguageDetection.karaoke-dev" Version="1.3.3-alpha" />
<PackageReference Include="Octokit" Version="0.50.0" />
<PackageReference Include="osu.Framework.KaraokeFont" Version="2022.417.0" />
<PackageReference Include="osu.Framework.KaraokeFont" Version="2022.423.1" />
<PackageReference Include="osu.Framework.Microphone" Version="2022.327.0" />
<PackageReference Include="ppy.osu.Game" Version="2022.418.0" />
<PackageReference Include="LyricMaker" Version="1.1.1" />
Expand Down

0 comments on commit 2b7b6f1

Please sign in to comment.